Compare commits

...

4 Commits

Author SHA1 Message Date
Natty 0ece56a871
Updated Libra 2023-03-27 19:57:06 +02:00
Natty 88c966974c
Rocket flames and fixed Maven repo URL 2023-03-27 19:55:46 +02:00
Natty 29e9f42bde
Removed pointless class hierarchy 2022-08-19 02:35:09 +02:00
Natty 54ade78b1d
Updated .gitignore to exclude out/ directories 2022-07-21 01:16:32 +02:00
15 changed files with 99 additions and 90 deletions

View File

@ -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")
}
}

View File

@ -25,4 +25,7 @@
/*/build
/bin
/*/bin
/*/bin
/out
/*/out

View File

@ -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

View File

@ -27,4 +27,7 @@
/bin
/*/bin
/*/logs
/*/logs
/out
/*/out

View File

@ -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

View File

@ -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

View File

@ -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()
{

View File

@ -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()
{

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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()
{

View File

@ -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);
}
}

View File

@ -25,4 +25,8 @@
/*/build
/bin
/*/bin
/*/bin
/out
/*/out

View File

@ -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

@ -1 +1 @@
Subproject commit 96217baf8fc9510444c20dbe1872339f798096e7
Subproject commit 12bfe6a1eb4c92f7ec12da42c12014d63922655d