-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added ability to change player type #1
base: master
Are you sure you want to change the base?
Changes from 8 commits
fc8c0d3
220fcd9
9cad96b
c78443b
61def31
884ce25
abf11d2
81d2dd2
228a213
f56bd41
c94dc34
595f1bb
bab46e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ shooter.iml | |
src/main/resources/**/*.png | ||
src/main/resources/**/*.ogg | ||
src/main/resources/**/*.fnt | ||
|
||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
FedotSoldier marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<project-shared-configuration> | ||
<!-- | ||
This file contains additional configuration written by modules in the NetBeans IDE. | ||
The configuration is intended to be shared among all the users of project and | ||
therefore it is assumed to be part of version control checkout. | ||
Without this configuration present, some functionality in the IDE may be limited or fail altogether. | ||
--> | ||
<properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1"> | ||
<!-- | ||
Properties that influence various parts of the IDE, especially code formatting and the like. | ||
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up. | ||
That way multiple projects can share the same settings (useful for formatting rules for example). | ||
Any value defined here will override the pom.xml file value but is only applicable to the current project. | ||
--> | ||
<netbeans.checkstyle.format>true</netbeans.checkstyle.format> | ||
<netbeans.hint.jdkPlatform>JDK_11.0.2</netbeans.hint.jdkPlatform> | ||
</properties> | ||
</project-shared-configuration> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Лишнее |
||
<actions> | ||
<action> | ||
<actionName>run</actionName> | ||
<packagings> | ||
<packaging>jar</packaging> | ||
</packagings> | ||
<goals> | ||
<goal>process-classes</goal> | ||
<goal>org.codehaus.mojo:exec-maven-plugin:1.5.0:exec</goal> | ||
</goals> | ||
<properties> | ||
<exec.args>-classpath %classpath aunmag.shooter.game.client.App mvn clean compile && mvn compile exec:java</exec.args> | ||
<exec.executable>java</exec.executable> | ||
<exec.workingdir>"/home/fedot/Рабочий стол/Files/shooter"</exec.workingdir> | ||
</properties> | ||
</action> | ||
<action> | ||
<actionName>debug</actionName> | ||
<packagings> | ||
<packaging>jar</packaging> | ||
</packagings> | ||
<goals> | ||
<goal>process-classes</goal> | ||
<goal>org.codehaus.mojo:exec-maven-plugin:1.5.0:exec</goal> | ||
</goals> | ||
<properties> | ||
<exec.args>-agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath aunmag.shooter.game.client.App mvn clean compile && mvn compile exec:java</exec.args> | ||
<exec.executable>java</exec.executable> | ||
<jpda.listen>true</jpda.listen> | ||
<exec.workingdir>"/home/fedot/Рабочий стол/Files/shooter"</exec.workingdir> | ||
</properties> | ||
</action> | ||
<action> | ||
<actionName>profile</actionName> | ||
<packagings> | ||
<packaging>jar</packaging> | ||
</packagings> | ||
<goals> | ||
<goal>process-classes</goal> | ||
<goal>org.codehaus.mojo:exec-maven-plugin:1.5.0:exec</goal> | ||
</goals> | ||
<properties> | ||
<exec.args>-classpath %classpath aunmag.shooter.game.client.App mvn clean compile && mvn compile exec:java</exec.args> | ||
<exec.executable>java</exec.executable> | ||
<exec.workingdir>"/home/fedot/Рабочий стол/Files/shooter"</exec.workingdir> | ||
</properties> | ||
</action> | ||
</actions> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,8 @@ public void reset() { | |
turningTo = null; | ||
} | ||
|
||
/* Setters */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Зачем? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ну там же сеттеры по сути. Я и перенес этот комментарий, чтобы он был над ними. Раньше был под ними. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
public void walkForward() { | ||
isWalkingForward = true; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -136,22 +136,24 @@ class ScenarioEncircling(world: World) : Scenario(world) { | |
|
||
private fun updateZombiesTypes() { | ||
val skillFactor = (difficulty - 1) * (wave - 1) + 1 | ||
zombie = creteZombieType(ActorType.zombie, skillFactor) | ||
zombieAgile = creteZombieType(ActorType.zombieAgile, skillFactor) | ||
zombieHeavy = creteZombieType(ActorType.zombieHeavy, skillFactor) | ||
zombie = createZombieType(ActorType.zombie, skillFactor) | ||
zombieAgile = createZombieType(ActorType.zombieAgile, skillFactor) | ||
zombieHeavy = createZombieType(ActorType.zombieHeavy, skillFactor) | ||
} | ||
|
||
private fun creteZombieType(type: ActorType, skillFactor: Float): ActorType { | ||
private fun createZombieType(type: ActorType, skillFactor: Float): ActorType { | ||
return ActorType( | ||
type.name, | ||
type.genus, | ||
type.radius, | ||
type.mass, | ||
skillFactor * type.strength, | ||
skillFactor * type.velocity, | ||
type.velocityFactorSprint, | ||
type.velocityRotation, | ||
type.damage, | ||
type.reaction | ||
type.reaction, | ||
type.primaryWeaponType | ||
) | ||
} | ||
|
||
|
@@ -191,19 +193,20 @@ class ScenarioEncircling(world: World) : Scenario(world) { | |
} | ||
|
||
private fun selectRandomWeaponType(): WeaponType { | ||
return when (UtilsMath.randomizeBetween(1, 2 * wave)) { | ||
return when (UtilsMath.randomizeBetween(1, 2 * wave + 1)) { | ||
1 -> WeaponType.pm | ||
2 -> WeaponType.tt | ||
3 -> WeaponType.mp43sawedOff | ||
4 -> WeaponType.mp27 | ||
5 -> WeaponType.pp91kedr | ||
6 -> WeaponType.pp19bizon | ||
7 -> WeaponType.aks74u | ||
8 -> WeaponType.ak74m | ||
9 -> WeaponType.rpk74 | ||
10 -> WeaponType.saiga12k | ||
11 -> WeaponType.pkm | ||
12 -> WeaponType.pkpPecheneg | ||
3 -> WeaponType.coltSingleActionArmy | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Изначально планировалось что бы не первой волне были только пистолеты, на второй двуствольные ружья, далее ПП, и так далее There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Сейчас все твои оружия могут выпасть только на тех же волнах как раньше. Плюс, к тем, которые могут выпасть на первой волне, добавляется револьвер. |
||
4 -> WeaponType.mp43sawedOff | ||
5 -> WeaponType.mp27 | ||
6 -> WeaponType.pp91kedr | ||
7 -> WeaponType.pp19bizon | ||
8 -> WeaponType.aks74u | ||
9 -> WeaponType.ak74m | ||
10 -> WeaponType.rpk74 | ||
11 -> WeaponType.saiga12k | ||
12 -> WeaponType.pkm | ||
13 -> WeaponType.pkpPecheneg | ||
else -> WeaponType.laserGun | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Лишнее