Exemplo n.º 1
0
    private void Awake()
    {
        playerAnim = this.gameObject.GetComponent <Animator>();
        if (!playerAnim)
        {
            Debug.LogError("플레이어 컨트롤러의 플레이어 애니메이터 Null");
        }

        playerStats = this.gameObject.GetComponent <PlayerStats>();
        if (!playerStats)
        {
            Debug.LogError("플레이어 컨트롤러의 플레이어 스탯 Null");
        }

        playerAtkMng = this.gameObject.GetComponent <PlayerAtkMng>();
        if (!playerAtkMng)
        {
            Debug.LogError("플레이어 컨트롤러의 플레이어 어택 매니져 Null");
        }

        floorMask = LayerMask.GetMask("Floor");

        changePlayerModelMng = this.gameObject.GetComponent <ChangePlayerModelMng>();
        if (!changePlayerModelMng)
        {
            Debug.LogError("플레이어 컨트롤러의 changePlayerModelMng is Null");
        }
    }
    private void OnCollisionEnter(Collision collision)
    {
        if (collision.gameObject.tag == "Player")
        {
            PlayerAtkMng player = collision.gameObject.GetComponent <PlayerAtkMng>();
            if (!player)
            {
                Debug.LogError("ChangeColliderWhenEndTutorial의 player is null");
                Debug.Break();
            }

            else if (!player.IsInTutorial)
            {
                BoxCollider collider = this.gameObject.GetComponent <BoxCollider>();
                if (!collider)
                {
                    Debug.LogError("ChangeColliderWhenEndTutorial의 collider is null");
                }
                else
                {
                    collider.isTrigger = true;
                }
            }
        }
    }
Exemplo n.º 3
0
    private bool isEnemiesAllDead        = false; //적들 다수를 생성 후 모두 죽었는지 확인하기 위한 변수

    void Start()
    {
        tutorialTextMng = this.gameObject.GetComponentInChildren <TutorialTextMng>();
        if (!tutorialTextMng)
        {
            Debug.LogError("TutorialMng의 dutorialTextMng is null");
            Debug.Break();
        }

        player = GameObject.FindGameObjectWithTag("Player");
        if (!player)
        {
            Debug.LogError("TutorialMng의 player is null");
            Debug.Break();
        }
        else
        {
            playerController = player.gameObject.GetComponent <PlayerController>();
            if (!playerController)
            {
                Debug.LogError("DutorialMng의 playerController is null");
            }

            playerAtkMng = player.gameObject.GetComponent <PlayerAtkMng>();
            if (!playerAtkMng)
            {
                Debug.LogError("DutorialMng의 playerAtkMng is null");
            }

            comboSystemMng = player.gameObject.GetComponent <ComboSystemMng>();
            if (!comboSystemMng)
            {
                Debug.LogError("DutorialMng의 comboSystemMng is null");
            }
        }

        enemies = this.gameObject.GetComponentsInChildren <EnemyStats>();
        for (int i = 0; i < enemies.Length; ++i)
        {
            if (!enemies[i])
            {
                Debug.Log("DutorialMng의 enemies[" + i + "] is null");
            }

            else if (enemies[i])
            {
                enemies[i].gameObject.SetActive(false);
            }
        }
    }
Exemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        comboSystemMng = ComboSystemMng.GetInstance();
        if (!comboSystemMng)
        {
            Debug.LogError("EndTutorial의 comboSystemMng is null");
            Debug.Break();
        }

        player = GameObject.FindGameObjectWithTag("Player");
        if (!player)
        {
            Debug.LogError("EndTutorial의 playeris null");
            Debug.Break();
        }
        else
        {
            playerAtkMng = player.gameObject.GetComponent <PlayerAtkMng>();
            if (!playerAtkMng)
            {
                Debug.LogError("EndTutorial의 playerAtkMng is null");
            }
        }
    }
Exemplo n.º 5
0
 private void Start()
 {
     playerAtkMng = this.GetComponent <PlayerAtkMng>();
 }