public void actOn(GameCharacter actingCharacter) { if (!empty) { spewOutIteams(); empty = true; } Audio.playSound("chest"); Engine.Engine.currentLevel.InteractableEnvironment.Remove(this); }
public void actOn(GameCharacter actingCharacter) { if (!active) { stepOn(actingCharacter); } if (active) { stepOff(actingCharacter); } }
public void actOn(GameCharacter actingCharacter) { changeSolid(); //directionFacing = directionFacing.Rotate(true); Audio.playSound("door"); }
public void actOn(GameCharacter actingCharacter) { changeSolid(); }
public void actOn(GameCharacter actingCharacter) { changeState(); setToNewPosition(actingCharacter); other.changeState(); }
private void setToNewPosition(GameCharacter actingCharacter) { IntVec exitPosition = Engine.Engine.currentLevel.InteractableEnvironment.FindPosition(other); IntVec finalPosition = exitPosition + other.directionFacing; IntVec characterPosition = Engine.Engine.currentLevel.CharacterEntities.FindPosition(actingCharacter); Engine.Engine.currentLevel.Move(actingCharacter, finalPosition, true); }
private void actOnTargets(GameCharacter actingCharacter) { for (int currentTarget = 0; currentTarget < numberofTargets; currentTarget++) { if (targets[currentTarget] != null) { targets[currentTarget].actOn(null); } } }
public void actOn(GameCharacter actingCharacter) { changeState(); Audio.playSound("switch"); if(targets[0] != null) { actOnTargets(actingCharacter); } }
public void stepOn(GameCharacter actingCharacter) { changeState(); target.actOn(actingCharacter); }
public abstract void drawVisualEffect(GameCharacter hero, GameCharacter enemy);
public abstract void TakeDamage(int damage, GameCharacter attacker);
public static void AddVisualAttack(GameCharacter origin, string attackSprite, float startScale = 1, float endScale = 1, float scaleAmount = 0.05f) { IntVec gamePositionOrigin = currentLevel.CharacterEntities.FindPosition(origin) * CELLWIDTH; Vector2 originVector = Vector2.Transform(new Vector2(gamePositionOrigin.X, gamePositionOrigin.Y), worldToView); if (attackSprite != null) { vattacks.Add(new VisualAttack(originVector, attackSprite, startScale, endScale, scaleAmount)); } else { } }
public static void AddVisualAttack(GameCharacter origin, GameCharacter target, DynamicTexture attackSprite, float startScale = 1, float endScale = 1, float scaleAmount = 0.05f) { IntVec gamePositionOrigin = currentLevel.CharacterEntities.FindPosition(origin) * CELLWIDTH; Vector2 originVector = Vector2.Transform(new Vector2(gamePositionOrigin.X, gamePositionOrigin.Y), worldToView); IntVec gamePositionDest = currentLevel.CharacterEntities.FindPosition(target) * CELLWIDTH; Vector2 destVector = Vector2.Transform(new Vector2(gamePositionDest.X, gamePositionDest.Y), worldToView); if (attackSprite != null) { vattacks.Add(new VisualAttack(originVector, destVector, 5, attackSprite, startScale, endScale, scaleAmount)); } else { vattacks.Add(new VisualAttack(originVector, destVector, 5, "attackSprite")); } }
public static void AddVisualAttack(GameCharacter origin, GameCharacter target, string attackSprite) { IntVec gamePositionOrigin = currentLevel.CharacterEntities.FindPosition(origin) * CELLWIDTH; Vector2 originVector = Vector2.Transform(new Vector2(gamePositionOrigin.X, gamePositionOrigin.Y), worldToView); IntVec gamePositionDest = currentLevel.CharacterEntities.FindPosition(target) * CELLWIDTH; Vector2 destVector = Vector2.Transform(new Vector2(gamePositionDest.X, gamePositionDest.Y), worldToView); vattacks.Add(new VisualAttack(originVector, destVector, 5, attackSprite)); }