コード例 #1
0
ファイル: Powerup.cs プロジェクト: facybenbook/jet-dash-vr
        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);
        }
コード例 #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);
        }