コード例 #1
0
 public bool MoveTo(GameObject gameObject, Coordinate coordinate, GameAnimation animation)
 {
     if (MoveTo(gameObject, coordinate, moveObject: false))
     {
         gameObject.Animate(animation);
         return(true);
     }
     return(false);
 }
コード例 #2
0
        public void AddWalkAnimation(GamePlayerDirection direction, GameAnimation animation)
        {
            if (animationDictionary.ContainsKey(direction))
            {
                animationDictionary.Add(direction, animation);
            }
            else
            {
                animationDictionary[direction] = animation;
            }

            animation.OnStart  += onAnimationStart;
            animation.OnFinish += onAnimationFinish;
        }
コード例 #3
0
ファイル: GameEngine.cs プロジェクト: alissonrubim/GuideMe
        public void MoveTo(GameObject gameObject, Coordinate cordinates, GameAnimation animation)
        {
            GameObject oldGameObject = currentMap.GetGameObjectAt(cordinates.Row, cordinates.Col);

            currentMap.MoveTo(gameObject, cordinates, animation);


            /*if (oldGameObject != null && oldGameObject.Type == GameObject.GameObjectType.Batery)
             * {
             *  MessageBox.Show("Bateria");
             * }
             * else if (oldGameObject != null && oldGameObject.Type == GameObject.GameObjectType.Target)
             * {
             *  MessageBox.Show("Ganhou");
             * }
             * else
             * {
             *  decreseEnergy();
             * }*/
        }
コード例 #4
0
ファイル: GameSprite.cs プロジェクト: alissonrubim/GuideMe
 public void Animate(GameAnimation gameAnimation)
 {
     gameAnimation.SetGameSprite(this);
     gameAnimation.Run();
 }