Exemple #1
0
        public void Relocate()
        {
            float x = SpawnableObjectRelocationBoundary.GetRandomX();
            float z = SpawnableObjectRelocationBoundary.GetRandomZ();

            this.transform.position = new Vector3(player.transform.position.x + x, this.transform.position.y, player.transform.position.z + z);
        }
Exemple #2
0
        /// <summary>
        /// Repositions and reanimates the obstacle.
        /// </summary>
        public void Relocate()
        {
            float x = SpawnableObjectRelocationBoundary.GetRandomX();
            float z = SpawnableObjectRelocationBoundary.GetRandomZ();

            this.transform.position = new Vector3(player.transform.position.x + x, this.transform.position.y, player.transform.position.z + z);

            Grow(Constants.OBSTACLE_GROW_SPEED, (int)transform.localScale.x);
        }