Exemplo n.º 1
0
    private bool CheckRestPlacesEnemy(out RestPlaceController rest)
    {
        List <RestPlaceController> restPlace = restPlaces.Where(r => r.restPlace.state == RestState.Full && r.restPlace.enemy == null).ToList();

        rest = restPlace.Count > 0 ? restPlace[Random.Range(0, restPlace.Count - 1)] : null;
        return(rest != null);
    }
Exemplo n.º 2
0
 public Tourist(TourisType type, string _id, float _speed, PatternRoute _pattern, RestPlaceController _restPlace, int _perfectReward)
 {
     id            = _id;
     speed         = _speed;
     pattern       = _pattern;
     state         = TouristState.None;
     routeState    = TouristRouteState.None;
     stunned       = false;
     restPlace     = _restPlace;
     perfectReward = _perfectReward;
 }
Exemplo n.º 3
0
 public Enemy(string _id, int _health, float _speed, PatternRoute _route, RestPlaceController _target, int rewards)
 {
     id                = _id;
     health            = _health;
     currentHealth     = _health;
     speed             = _speed;
     target            = _target;
     pattern           = _route;
     state             = EnemyState.Alive;
     action            = EnemyAction.None;
     rewardBeforeStunt = rewards;
 }