Compare commits
4 Commits
22.3.0.0-a
...
master
Author | SHA1 | Date |
---|---|---|
Natty | 0ece56a871 | |
Natty | 88c966974c | |
Natty | 29e9f42bde | |
Natty | 54ade78b1d |
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,4 +25,7 @@
|
|||
/*/build
|
||||
|
||||
/bin
|
||||
/*/bin
|
||||
/*/bin
|
||||
|
||||
/out
|
||||
/*/out
|
|
@ -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
|
||||
|
|
|
@ -27,4 +27,7 @@
|
|||
/bin
|
||||
/*/bin
|
||||
|
||||
/*/logs
|
||||
/*/logs
|
||||
|
||||
/out
|
||||
/*/out
|
|
@ -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
|
||||
|
|
|
@ -30,7 +30,7 @@ import cz.tefek.srclone.EnumTeam;
|
|||
import cz.tefek.srclone.SRCloneMod;
|
||||
import cz.tefek.srclone.ammo.EnumAmmo;
|
||||
|
||||
public class EntityProjectileEnemyHeatStar extends EntityProjectileHeatStar
|
||||
public class EntityProjectileEnemyHeatStar extends EntityProjectileAmmo
|
||||
{
|
||||
public EntityProjectileEnemyHeatStar()
|
||||
{
|
||||
|
|
|
@ -30,7 +30,7 @@ import cz.tefek.srclone.EnumTeam;
|
|||
import cz.tefek.srclone.SRCloneMod;
|
||||
import cz.tefek.srclone.ammo.EnumAmmo;
|
||||
|
||||
public class EntityProjectileEnemyLaserBeam extends EntityProjectileLaserBeam
|
||||
public class EntityProjectileEnemyLaserBeam extends EntityProjectileAmmo
|
||||
{
|
||||
public EntityProjectileEnemyLaserBeam()
|
||||
{
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
/*
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2022 493msi
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package cz.tefek.srclone.entity.projectile;
|
||||
|
||||
import cz.tefek.srclone.ammo.EnumAmmo;
|
||||
|
||||
public class EntityProjectileHeatStar extends EntityProjectileAmmo
|
||||
{
|
||||
|
||||
protected EntityProjectileHeatStar(EnumAmmo ammo)
|
||||
{
|
||||
super(ammo);
|
||||
}
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
/*
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2022 493msi
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package cz.tefek.srclone.entity.projectile;
|
||||
|
||||
import cz.tefek.srclone.ammo.EnumAmmo;
|
||||
|
||||
public class EntityProjectileLaserBeam extends EntityProjectileAmmo
|
||||
{
|
||||
protected EntityProjectileLaserBeam(EnumAmmo ammo)
|
||||
{
|
||||
super(ammo);
|
||||
}
|
||||
}
|
|
@ -30,7 +30,7 @@ import cz.tefek.srclone.EnumTeam;
|
|||
import cz.tefek.srclone.SRCloneMod;
|
||||
import cz.tefek.srclone.ammo.EnumAmmo;
|
||||
|
||||
public class EntityProjectilePlayerLaserBeam extends EntityProjectileLaserBeam
|
||||
public class EntityProjectilePlayerLaserBeam extends EntityProjectileAmmo
|
||||
{
|
||||
public EntityProjectilePlayerLaserBeam()
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,4 +25,8 @@
|
|||
/*/build
|
||||
|
||||
/bin
|
||||
/*/bin
|
||||
/*/bin
|
||||
|
||||
|
||||
/out
|
||||
/*/out
|
|
@ -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
|
||||
|
|
2
libra
2
libra
|
@ -1 +1 @@
|
|||
Subproject commit 96217baf8fc9510444c20dbe1872339f798096e7
|
||||
Subproject commit 12bfe6a1eb4c92f7ec12da42c12014d63922655d
|
Loading…
Reference in New Issue