/* * * 初期化に関するメソッド * */ void Start() { canWallBroken = false; currentWallStatus = wallDestructionStatus.STANDING; m_BreakSmoke = Resources.Load("Prefabs/Particles/BreakSmoke") as GameObject; m_BreakFire = Resources.Load("Prefabs/Particles/BreakFire") as GameObject; }
void WallStatus() { if (currentWallStatus == wallDestructionStatus.STANDING && CanDestroyWall()) { this.gameObject.collider.enabled = false; GameObject.Instantiate(m_BreakSmoke, this.transform.position + Vector3.up * 5, Quaternion.identity); GameObject.Instantiate(m_BreakFire, this.transform.position + Vector3.up * 5, Quaternion.identity); currentWallStatus = wallDestructionStatus.FALLING; } else if (currentWallStatus == wallDestructionStatus.FALLING) { ProcessDestruction(); } }