Exemplo n.º 1
0
        public void SpawnSheeps(int i)
        {
            var        SheepData = Data.SheepData;
            GameObject instance  = GameObject.Instantiate(SheepData.Prefab, new Vector3(i, 1, i), Quaternion.identity);
            SheepModel Sheep     = new SheepModel(instance, SheepData);

            _context.SheepModels.Add(i, Sheep);
        }
Exemplo n.º 2
0
        public IEnumerator updateModel(SheepModel Model, int Time)
        {
            yield return(new WaitForSeconds(Time));

            if (Model.Sheep != null)
            {
                Model.SheepAgent.nextPosition   = Model.GetPosition().position;
                Model.SheepAgent.updatePosition = true;
                Model.IsPatrol = true;
            }
        }
Exemplo n.º 3
0
 public void StartC(SheepModel Model, int Time)
 {
     StartCoroutine(updateModel(Model, Time));
 }