-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added TriggerArea, made the minimap less transparent, and added FEELT…
…ODO.md
- Loading branch information
Showing
19 changed files
with
382 additions
and
54 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file modified
BIN
+1 Byte
(100%)
Client/export/windows/cpp/bin/shared/images/minimaptile2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
To improve: | ||
* Sounds | ||
* Add lots of bass to sound | ||
* More obvious/exagerated animations | ||
* Lower enemy hp | ||
* Higher rate of fire | ||
* More enemies | ||
* Bigger bullets | ||
* Muzzle flash | ||
* Faster bullets | ||
* Less accuracy (probably not) | ||
* Hit animation | ||
* Enemy knockback | ||
* Permanence (gibs that stay forever) | ||
* Screen shake (when firing) | ||
* Player knockback upon firing | ||
* Sleep on hit? | ||
* Gun follow delay | ||
* Gun kicks backward upon firing | ||
* Gun shells permanence | ||
* More destructive and spectacular weapons | ||
* Random explosions | ||
* Faster enemies | ||
* Bigger explosions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+1 Byte
(100%)
Server/export/windows/cpp/bin/shared/images/minimaptile2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package entities; | ||
import flixel.util.FlxTimer; | ||
import plugins.BasePlugin; | ||
|
||
/** | ||
* ... | ||
* @author ... | ||
*/ | ||
class Trigger | ||
{ | ||
public var parent:Dynamic; | ||
public var ready:Bool = true; | ||
public var cooldown:Int; | ||
|
||
public function new(Parent:Dynamic, Cooldown:Int) | ||
{ | ||
parent = Parent; | ||
|
||
var parsed:Int = Std.parseInt(parent); | ||
if (Std.parseInt(parent) != null) | ||
parent = parsed; | ||
|
||
cooldown = Cooldown; | ||
} | ||
|
||
public function toggle():Void | ||
{ | ||
if (Std.is(parent, String)) | ||
{ | ||
var plugin:BasePlugin = cast Reg.plugins.get(cast parent); | ||
plugin.working = !plugin.working; | ||
} | ||
else | ||
{ | ||
var entity:Dynamic = OgmoLoader.entities.get(parent); | ||
|
||
var entWorking:Bool = Reflect.getProperty(entity, "working"); | ||
Reflect.setProperty(entity, "working", !entWorking); | ||
} | ||
|
||
ready = false; | ||
new FlxTimer(cooldown, function(T:FlxTimer) { ready = true; } ); | ||
} | ||
|
||
public function activate():Void | ||
{ | ||
if (Std.is(parent, String)) | ||
{ | ||
var plugin:BasePlugin = cast Reg.plugins.get(cast parent); | ||
plugin.activate(); | ||
} | ||
else | ||
{ | ||
var entity:Dynamic = OgmoLoader.entities.get(parent); | ||
|
||
Reflect.setProperty(entity, "working", true); | ||
} | ||
|
||
ready = false; | ||
new FlxTimer(cooldown, function(T:FlxTimer) { ready = true; } ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
package entities; | ||
|
||
import entities.TriggerArea.TriggerHitbox; | ||
import flixel.FlxG; | ||
import flixel.FlxSprite; | ||
import haxe.xml.Fast; | ||
|
||
/** | ||
* ... | ||
* @author ... | ||
*/ | ||
class TriggerArea extends Trigger | ||
{ | ||
public var teams:Array<Bool>; | ||
public var doToggle:Bool; | ||
|
||
public function new(Parent:Dynamic, Cooldown:Int, DoToggle:Bool, Teams:Array<Bool>, | ||
X:Int, Y:Int, Width:Int, Height:Int) | ||
{ | ||
teams = Teams; | ||
doToggle = DoToggle; | ||
super(Parent, Cooldown); | ||
|
||
new TriggerHitbox(this, X, Y, Width, Height); | ||
} | ||
|
||
static public function makeFromXML(D:Fast):TriggerArea | ||
{ | ||
var doToggle:Bool = false; | ||
if (D.att.doToggle == "True") | ||
doToggle = true; | ||
|
||
var teams:Array<Bool> = []; | ||
var teamtext:String = D.att.teams; | ||
|
||
var t:Int = 0; | ||
while (t < teamtext.length) | ||
{ | ||
if (teamtext.charAt(t) == "1") | ||
{ | ||
teams.push(true); | ||
} | ||
|
||
else | ||
{ | ||
teams.push(false); | ||
} | ||
|
||
t++; | ||
} | ||
|
||
return new TriggerArea(D.att.parent, | ||
Std.parseInt(D.att.cooldown), | ||
doToggle, | ||
teams, | ||
Std.parseInt(D.att.x), | ||
Std.parseInt(D.att.y), | ||
Std.parseInt(D.att.width), | ||
Std.parseInt(D.att.height)); | ||
} | ||
|
||
static public function init():Void | ||
{ | ||
|
||
} | ||
} | ||
|
||
class TriggerHitbox extends FlxSprite | ||
{ | ||
public var trigger:TriggerArea; | ||
|
||
public function new(Trig:TriggerArea, X:Int, Y:Int, Width:Int, Height:Int) | ||
{ | ||
super(X, Y); | ||
trigger = Trig; | ||
|
||
makeGraphic(Width, Height, 0x00000000); | ||
|
||
Reg.state.ent.add(this); | ||
} | ||
|
||
override public function update():Void | ||
{ | ||
super.update(); | ||
|
||
for (p in Reg.server.playermap.iterator()) | ||
{ | ||
if (trigger.teams[p.team] == true) | ||
{ | ||
if (FlxG.overlap(this, p) && trigger.ready) | ||
{ | ||
if (trigger.doToggle) | ||
{ | ||
trigger.toggle(); | ||
} | ||
else | ||
{ | ||
trigger.activate(); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.