コード例 #1
0
ファイル: HelpSpawnManager.cs プロジェクト: joouur/3DPONG
        public void Awake()
        {
            if (Instance != null)
            {
                Debug.Log("Game Manager is already in play. Deleting old Instantiating new.");
                Destroy(gameObject);
            }
            else
                Instance = this;

            RotObj = Resources.Load("Prefabs/RotJoint", typeof(GameObject)) as GameObject;
            RampObj = Resources.Load("Prefabs/Ramp", typeof(GameObject)) as GameObject;
            StepObj = Resources.Load("Prefabs/Steps", typeof(GameObject)) as GameObject;

            randN = Random.Range(0, 4);
            objs = new bool[4];
            newPosition = setNewPosition();
        }
コード例 #2
0
        public void Awake()
        {
            if (Instance != null)
            {
                Debug.Log("Game Manager is already in play. Deleting old Instantiating new.");
                Destroy(gameObject);
            }
            else
            {
                Instance = this;
            }

            RotObj  = Resources.Load("Prefabs/RotJoint", typeof(GameObject)) as GameObject;
            RampObj = Resources.Load("Prefabs/Ramp", typeof(GameObject)) as GameObject;
            StepObj = Resources.Load("Prefabs/Steps", typeof(GameObject)) as GameObject;

            randN       = Random.Range(0, 4);
            objs        = new bool[4];
            newPosition = setNewPosition();
        }