Пример #1
0
    void Awake()
    {
        PlacePointMNG = GameObject.FindGameObjectWithTag("PlacePointMNG").GetComponent <PlacePoints>();
        ThePath       = PlacePointMNG.TravelPoints;

        MonsterCount = 0;
        MonstersDied = 0;
        threshold    = 0.1f;

        MonsterList      = new List <Monster>();
        MonstersSpawning = false;

        //slow down time
        //Time.timeScale = 0.1f;
    }
Пример #2
0
            private void UpdatePointsArray()
            {
                var count = SelectedObject.Drivers.Count;

                if (Points.Count == count)
                {
                    return;
                }

                Points.ReplaceEverythingBy_Direct(Enumerable.Range(1, count).Select((x, i) => {
                    var result = new PlacePoints(x)
                    {
                        Value = SelectedObject.Rules.Points.ArrayElementAtOrDefault(i)
                    };
                    result.PropertyChanged += OnPlacePointsPropertyChanged;
                    return(result);
                }));
            }
Пример #3
0
 /// <summary>
 /// Initialize method. BodyOfPoint = the game object associated with the class Point.
 /// MouseClick = where the point is placed
 /// </summary>
 /// <param name="BodyOfPoint"></param>
 /// <param name="MouseClick"></param>
 private void CreateBody(GameObject BodyOfPoint, Vector3 MouseClick)
 {
     PlacePointMNG = GameObject.FindGameObjectWithTag("PlacePointMNG").GetComponent <PlacePoints>();
     Body          = GameObject.Instantiate(BodyOfPoint, MouseClick, Quaternion.identity, PlacePointMNG.gameObject.transform);
 }