コード例 #1
0
        public void SpawnBonus(SpawnObjectRecord record, MoveComponent self)
        {
            var headPos = _head.transform.position;

            headPos.z += _spawnRange;
            headPos.x  = self.transform.position.x;
            headPos.y  = 0;
            var item = PhotonNetwork.InstantiateSceneObject(record.Prefab.name, headPos, Quaternion.identity);

            _items.Add(item);
        }
コード例 #2
0
        public void SpawnObject(SpawnObjectRecord record)
        {
            var center = SlotLanes.Instance.CenterX;

            var headPos = _head.transform.position;

            headPos.z += _spawnRange;
            headPos.x  = center;
            headPos.y  = 0;
            var item = PhotonNetwork.InstantiateSceneObject(record.Prefab.name, headPos, Quaternion.identity);

            _items.Add(item);
        }