public void initialize() { player = new GameObject(); player.AddBehaviour("StatBehaviour",new StatBehaviour(100, 100, 1)); Stats = player.GetBehaviourOfType("StatBehaviour") as StatBehaviour; }
public HUDBehaviour(Texture2D textureHealth, Texture2D textureTestos, SpriteFont text, GameObject gameObject) { TextureHealth = textureHealth; TextureTestos = textureTestos; Text = text; GameObject = gameObject; Stats = gameObject.GetBehaviourOfType("StatBehaviour") as StatBehaviour; PositionHealth = new Vector2(5, 5); PositionTestos = new Vector2(5, 30); }
public void initialize() { player = new GameObject(true, true); shieldBehaviour = new ShieldBehaviour(null); player.AddBehaviour("ShieldBehaviour",shieldBehaviour); statBehaviour = new StatBehaviour(100, 100, 0); player.AddBehaviour("StatBehaviour",statBehaviour); hitBehaviour = new HitBehaviour(null); player.AddBehaviour("HitBehaviour",hitBehaviour); }
public DropItem(GameObject player) { GameObject = player; behaviourStat = GameObject.GetBehaviourOfType("StatBehaviour") as StatBehaviour; }
public bool AllowDraw() { stats = GameObject.GetBehaviourOfType("StatBehaviour") as StatBehaviour; return stats.Testos > 0; }
private void shieldUseTestos() { stats = GameObject.GetBehaviourOfType("StatBehaviour") as StatBehaviour; stats.TestosDown(2); }