コード例 #1
0
ファイル: DeathWallCtrl.cs プロジェクト: Costie92/UnityRun
 private void Awake()
 {
     obsST = new ObstacleST();
     obsST.obstacleType = E_OBSTACLE.DEATH_WALL;   //그냥 파이어로 처리 (즉사는 같은 거임./)
     obsST.beenHit      = true;
     objToCharactor     = GameObject.FindGameObjectWithTag("PLAYER").GetComponent <IObjToCharactor>();
 }
コード例 #2
0
 void Awake()
 {
     obsST              = new ObstacleST();
     obsST.beenHit      = true;
     obsST.obstacleType = E_OBSTACLE.FIRE;
     fireParticle       = transform.Find("FireParticle").gameObject.GetComponent <ParticleSystem>();
     objToCharactor     = GameObject.FindGameObjectWithTag("PLAYER").GetComponent <IObjToCharactor>();
     myCollider         = GetComponent <Collider>();
 }
コード例 #3
0
ファイル: ObstacleCtrl.cs プロジェクト: Costie92/UnityRun
 protected virtual void Awake()
 {
     obsST              = new ObstacleST();
     playerTr           = GameObject.FindGameObjectWithTag("PLAYER").transform;
     childModel         = transform.Find("childModel").gameObject; //구형 장애물 모델링 자식 추출  (transform.find로 자식 중 내에서 검색)
     obsST.beenHit      = false;
     objToCharactor     = playerTr.gameObject.GetComponent <IObjToCharactor>();
     childModelRdr      = childModel.GetComponent <Renderer>();
     childModelCollider = childModel.GetComponent <Collider>();
 }