示例#1
0
    protected override void UpdateState()
    {
        if (Vector2.Distance(Player.transform.position, transform.position) < ViewRange)
        {
            State = AIState.FIRING;
        }
        else
        {
            State = AIState.WAITING;
        }

        switch (State)
        {
        case AIState.WAITING:



            break;

        case AIState.FIRING:

            RotateTowards(Player.transform.position);

            CharacterRef.Fire();

            break;
        }
    }
示例#2
0
        public static Character GetCharacter()
        {
            string    characterString = Read().ToLowerInvariant();
            Character character;

            while (!CharacterRef.TryGetValue(characterString, out character))
            {
                PrintLine("Enter a valid Character. See included 'characters.txt' for a list of valid characters: ");
                Print("Main Character: ");
                characterString = Read().ToLowerInvariant();
            }
            PrintLine($"Got character {character.ToOutput()}");

            return(character);
        }
示例#3
0
 public void Fire()
 {
     CharacterRef.Fire();
 }