public override void Awake() { base.Awake(); _oAudioSource = Function.AddComponent <AudioSource>(this.gameObject); _oAudioSource.playOnAwake = false; }
//! 초기화 public override void Awake() { base.Awake(); m_oSpriteRenderer = Function.AddComponent <SpriteRenderer>(this.gameObject); m_oSpriteAnimation = Function.AddComponent <CSpriteAnimation>(this.gameObject); }
//! 게임 객체를 생성한다 public static T CreateGameObject <T>(string a_oName, GameObject a_oParent, bool a_bIsWorldStay = false, bool a_bIsResetTransform = false) where T : Component { var oGameObject = Function.CreateGameObject(a_oName, a_oParent, a_bIsWorldStay, a_bIsResetTransform); return(Function.AddComponent <T>(oGameObject)); }
public void Awake() { CGameDataStorage.Instance.GamePhase = EGamePhase.SELECT; CGameDataStorage.Instance.CellObjectList = new GameObject[7, 7]; _inputManagers = new CInputManagerBase[2]; _inputManagers[0] = Function.AddComponent <C1PInputManager>(gameObject); _inputManagers[1] = Function.AddComponent <C2PInputManager>(gameObject); CGameDataStorage.Instance.CurrentTurn = EGermColor.BLUE; for (int i = 0; i < 7; ++i) { for (int j = 0; j < 7; ++j) { var cell = Function.CreateCopiedGameObject("Cell:" + j.ToString() + "X" + i.ToString(), _originCell, CSceneManager.ObjectRoot); cell.transform.localPosition = new Vector3(-255.0f + (85.0f * j), 255.0f - (85.0f * i), 0.0f); var cellClass = cell.GetComponent <CCell>(); cellClass.CellIndexX = j; cellClass.CellIndexY = i; if (i == 0 && j == 0 || i == 6 && j == 6) { cellClass.CellStatus = EGermColor.BLUE; cellClass.ChangeGermColor(EGermColor.BLUE); } else if (i == 0 && j == 6 || i == 6 && j == 0) { cellClass.CellStatus = EGermColor.RED; cellClass.ChangeGermColor(EGermColor.RED); } CGameDataStorage.Instance.CellObjectList[j, i] = cell; } } }
//! 초기화 public void Awake() { _spriteRenderer = Function.AddComponent <SpriteRenderer>(this.gameObject); }