예제 #1
0
파일: Chest.cs 프로젝트: JonECG/Brogue
 public void actOn(GameCharacter actingCharacter)
 {
     if (!empty)
     {
         spewOutIteams();
         empty = true;
     }
     Audio.playSound("chest");
     Engine.Engine.currentLevel.InteractableEnvironment.Remove(this);
 }
예제 #2
0
파일: Swiches.cs 프로젝트: JonECG/Brogue
 public void actOn(GameCharacter actingCharacter)
 {
     if (!active)
     {
         stepOn(actingCharacter);
     }
     if (active)
     {
         stepOff(actingCharacter);
     }
 }
예제 #3
0
파일: Door.cs 프로젝트: JonECG/Brogue
 public void actOn(GameCharacter actingCharacter)
 {
     changeSolid();
        //directionFacing = directionFacing.Rotate(true);
        Audio.playSound("door");
 }
예제 #4
0
파일: Door.cs 프로젝트: JonECG/Brogue
 public void actOn(GameCharacter actingCharacter)
 {
     changeSolid();
 }
예제 #5
0
 public void actOn(GameCharacter actingCharacter)
 {
     changeState();
     setToNewPosition(actingCharacter);
     other.changeState();
 }
예제 #6
0
        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);
        }
예제 #7
0
파일: Swiches.cs 프로젝트: JonECG/Brogue
 private void actOnTargets(GameCharacter actingCharacter)
 {
     for (int currentTarget = 0; currentTarget < numberofTargets; currentTarget++)
     {
         if (targets[currentTarget] != null)
         {
             targets[currentTarget].actOn(null);
         }
     }
 }
예제 #8
0
파일: Swiches.cs 프로젝트: JonECG/Brogue
        public void actOn(GameCharacter actingCharacter)
        {
            changeState();
            Audio.playSound("switch");

            if(targets[0] != null)
            {
                actOnTargets(actingCharacter);
            }
        }
예제 #9
0
파일: Swiches.cs 프로젝트: JonECG/Brogue
 public void stepOn(GameCharacter actingCharacter)
 {
     changeState();
     target.actOn(actingCharacter);
 }
예제 #10
0
 public abstract void drawVisualEffect(GameCharacter hero, GameCharacter enemy);
예제 #11
0
 public abstract void TakeDamage(int damage, GameCharacter attacker);
예제 #12
0
파일: Engine.cs 프로젝트: JonECG/Brogue
 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
     {
     }
 }
예제 #13
0
파일: Engine.cs 프로젝트: JonECG/Brogue
 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"));
     }
 }
예제 #14
0
파일: Engine.cs 프로젝트: JonECG/Brogue
 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));
 }
예제 #15
0
 public abstract void TakeDamage(int damage, GameCharacter attacker);