Rocket flames and fixed Maven repo URL
This commit is contained in:
parent
29e9f42bde
commit
88c966974c
|
@ -19,7 +19,7 @@ repositories {
|
|||
|
||||
maven {
|
||||
name = "Vega"
|
||||
url = uri("https://vega.botdiril.com/")
|
||||
url = uri("https://vega.botdiril.com/releases")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ repositories {
|
|||
|
||||
maven {
|
||||
name = "Vega"
|
||||
url = uri("https://vega.botdiril.com/")
|
||||
url = uri("https://vega.botdiril.com/releases")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ subprojects {
|
|||
repositories {
|
||||
maven {
|
||||
name = "Vega"
|
||||
url = uri("https://vega.botdiril.com/")
|
||||
url = uri("https://vega.botdiril.com/releases")
|
||||
credentials {
|
||||
val vegaUsername: String? by project
|
||||
val vegaPassword: String? by project
|
||||
|
|
|
@ -30,6 +30,7 @@ import cz.tefek.srclone.Game;
|
|||
import cz.tefek.srclone.SRCloneMod;
|
||||
import cz.tefek.srclone.ammo.EnumAmmo;
|
||||
import cz.tefek.srclone.entity.pickup.EntityBox;
|
||||
import cz.tefek.srclone.util.AngleUtil;
|
||||
|
||||
public class EntityEnemyScout extends EntityEnemy
|
||||
{
|
||||
|
@ -128,10 +129,42 @@ public class EntityEnemyScout extends EntityEnemy
|
|||
{
|
||||
float w = 128, h = 128;
|
||||
|
||||
RectangleRenderer2D.draw(SRCloneMod.centeredQuad)
|
||||
.at(this.getRenderX(), this.getRenderY(), w, h)
|
||||
.sprite(SRCloneMod.enemyScout.getSideFromAngle(this.rotation))
|
||||
.flush();
|
||||
float engineOffset = 20;
|
||||
|
||||
float engineX = this.getRenderX() - (float) (Math.sin(this.rotation) * engineOffset);
|
||||
float engineY = this.getRenderY() - (float) (Math.cos(this.rotation) * engineOffset);
|
||||
|
||||
float nozzleRot = (float) (-this.rotation + Math.PI / 4.0f * 3.0f);
|
||||
|
||||
if (Math.cos(this.rotation) > 0.3f)
|
||||
{
|
||||
RectangleRenderer2D.draw(SRCloneMod.centeredQuad)
|
||||
.at(engineX, engineY, w, h)
|
||||
.rotate(AngleUtil.snapToDirections(nozzleRot, SRCloneMod.enemyScout.getSideCount()))
|
||||
.recolor(1.0f, 0.0f, 1.0f, 0.3f)
|
||||
.texture(SRCloneMod.rocketNozzle)
|
||||
.flush();
|
||||
|
||||
RectangleRenderer2D.draw(SRCloneMod.centeredQuad)
|
||||
.at(this.getRenderX(), this.getRenderY(), w, h)
|
||||
.sprite(SRCloneMod.enemyScout.getSideFromAngle(this.rotation))
|
||||
.flush();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
RectangleRenderer2D.draw(SRCloneMod.centeredQuad)
|
||||
.at(this.getRenderX(), this.getRenderY(), w, h)
|
||||
.sprite(SRCloneMod.enemyScout.getSideFromAngle(this.rotation))
|
||||
.flush();
|
||||
|
||||
RectangleRenderer2D.draw(SRCloneMod.centeredQuad)
|
||||
.at(engineX, engineY, w, h)
|
||||
.rotate(AngleUtil.snapToDirections(nozzleRot, SRCloneMod.enemyScout.getSideCount()))
|
||||
.recolor(1.0f, 0.0f, 1.0f, 0.3f)
|
||||
.texture(SRCloneMod.rocketNozzle)
|
||||
.flush();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -124,10 +124,42 @@ public class EntityEnemySmallBomber extends EntityEnemy
|
|||
{
|
||||
float w = 128, h = 128;
|
||||
|
||||
RectangleRenderer2D.draw(SRCloneMod.centeredQuad)
|
||||
.at(this.getRenderX(), this.getRenderY(), w, h)
|
||||
.sprite(SRCloneMod.enemySmallBomber.getSideFromAngle(this.rotation))
|
||||
.flush();
|
||||
float engineOffset = 15;
|
||||
|
||||
float engineX = this.getRenderX() - (float) (Math.sin(this.rotation) * engineOffset);
|
||||
float engineY = this.getRenderY() - (float) (Math.cos(this.rotation) * engineOffset);
|
||||
|
||||
float nozzleRot = (float) (-this.rotation + Math.PI / 4.0f * 3.0f);
|
||||
|
||||
if (Math.cos(this.rotation) > 0.3f)
|
||||
{
|
||||
RectangleRenderer2D.draw(SRCloneMod.centeredQuad)
|
||||
.at(engineX, engineY, w, h)
|
||||
.rotate(AngleUtil.snapToDirections(nozzleRot, SRCloneMod.enemySmallBomber.getSideCount()))
|
||||
.recolor(1.0f, 0.0f, 1.0f, 0.3f)
|
||||
.texture(SRCloneMod.rocketNozzle)
|
||||
.flush();
|
||||
|
||||
RectangleRenderer2D.draw(SRCloneMod.centeredQuad)
|
||||
.at(this.getRenderX(), this.getRenderY(), w, h)
|
||||
.sprite(SRCloneMod.enemySmallBomber.getSideFromAngle(this.rotation))
|
||||
.flush();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
RectangleRenderer2D.draw(SRCloneMod.centeredQuad)
|
||||
.at(this.getRenderX(), this.getRenderY(), w, h)
|
||||
.sprite(SRCloneMod.enemySmallBomber.getSideFromAngle(this.rotation))
|
||||
.flush();
|
||||
|
||||
RectangleRenderer2D.draw(SRCloneMod.centeredQuad)
|
||||
.at(engineX, engineY, w, h)
|
||||
.rotate(AngleUtil.snapToDirections(nozzleRot, SRCloneMod.enemySmallBomber.getSideCount()))
|
||||
.recolor(1.0f, 0.0f, 1.0f, 0.3f)
|
||||
.texture(SRCloneMod.rocketNozzle)
|
||||
.flush();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -38,4 +38,9 @@ public class AngleUtil
|
|||
|
||||
return angle;
|
||||
}
|
||||
|
||||
public static float snapToDirections(float angle, int directions)
|
||||
{
|
||||
return (float) (2.0f * Math.PI * Math.round(angle / 2.0f / Math.PI * directions) / directions);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ subprojects {
|
|||
repositories {
|
||||
maven {
|
||||
name = "Vega"
|
||||
url = uri("https://vega.botdiril.com/")
|
||||
url = uri("https://vega.botdiril.com/releases")
|
||||
credentials {
|
||||
val vegaUsername: String? by project
|
||||
val vegaPassword: String? by project
|
||||
|
|
Loading…
Reference in New Issue