Exemplo n.º 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);
        }
Exemplo n.º 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);
        }