示例#1
0
 protected void EnterTurnOrder()
 {
     if (WorldController.GetDistanceFromPlayer(MyPosition()) < Settings.enterTurnDistance)
     {
         TurnOrder.AddTurn(gameObject);
     }
     else
     {
         TurnOrder.AddConcurrentTurn(gameObject);
     }
 }
示例#2
0
    //Public

    public override bool StartConcurrentTurn()
    {
        if (PlayerWithInRange(Settings.enterTurnDistance))
        {
            TurnOrder.AddTurn(gameObject);
            player.GetComponent <PlayerUI>().SetMessage("Enemy In Range");
            return(false);
        }
        if (OutOfSight())
        {
            MoveRandomly();
        }
        else
        {
            PathToPlayer();
        }
        return(true);
    }
 private void Start()
 {
     WorldController.SetDistanceFromPlayer();
     TurnOrder.AddTurn(gameObject);
     WorldController.AddToWorld(gameObject, (int)transform.position.x, (int)transform.position.y);
 }