Example #1
0
        public void SetTraveler(int health_population, int infect_population, Sprite sprite, Village destination, Village originate, DiseaseSO disease, int timecost, OnReachDestiny reachCallback)
        {
            spriteRenderer.sprite  = sprite;
            this.health_population = health_population;
            this.infect_population = infect_population;

            this.destination = destination;
            this.originate   = originate;
            this.timecost    = timecost;
            this.timeSpent   = 0;

            possibleDisease = disease;

            this.reachCallback = reachCallback;

            transform.position = originate.transform.position;

            infectIndicatorSprite.enabled = (infect_population > 0);
        }
        private void OnTravelersReachDestination(Traveler traveler, Village desitination)
        {
            desitination.OnTravelerArrive(traveler);

            _travelers.Remove(traveler);
        }