Exemplo n.º 1
0
        public override void UpdateBehavior(EnemyController enemyController, Character character)
        {
            if (alwaysUpdatePosition == true)
            {
                movementPosition = new Vector3(character.Target.transform.position.x, character.Target.transform.position.y, 0) + randomPosition;
            }
            character.LookAt(character.Target.transform);
            if (character.MoveToPoint(movementPosition, 0, 0) == true)
            {
                if (behaviourDestination != null)
                {
                    enemyController.ForcePattern(behaviourDestination, character);
                }

                /*else if (behaviourID != -1)
                 * {
                 *
                 * }*/
                else
                {
                    enemyController.StopPattern();
                }
            }
        }