コード例 #1
0
ファイル: PlayerSkill.cs プロジェクト: Schwarzken/Yasushi
    float skillsTimer = 0.0f; // A skillsTimer variable is shared between the three skills.

    void Start()
    {
        sfx = FindObjectOfType <Sounds>();
        bossChargeHittable = true;
        anim             = GetComponent <Animator>();
        attackScript     = GetComponent <PlayerAttack>();
        comboScript      = GetComponent <ComboCounter>();
        healthScript     = GetComponent <PlayerHealth>();
        consumeScript    = GetComponent <PlayerConsume>();
        controllerScript = GetComponent <PlayerController>();
        GameObject iconsHolder = GameObject.Find("HUDCanvas/AbilityIcons");

        chargeIcon  = iconsHolder.transform.GetChild(0).GetComponent <IconCoolDown>();
        dodgeIcon   = iconsHolder.transform.GetChild(1).GetComponent <IconCoolDown>();
        tornadoIcon = iconsHolder.transform.GetChild(3).GetComponent <IconCoolDown>();
        rb          = GetComponent <Rigidbody2D>();
    }
コード例 #2
0
ファイル: PlayerConsume.cs プロジェクト: Schwarzken/Yasushi
    //For Special Enemies Checking
    // public GameObject tempura1;
    // public GameObject makiroll1;

    void Start()
    {
        if (SceneManager.GetActiveScene().buildIndex == 2)
        {
            f1Manager = FindObjectOfType <Fight1Manager>();
        }
        else if (SceneManager.GetActiveScene().buildIndex == 4)
        {
            f2Manager = FindObjectOfType <Fight2Manager>();
        }
        comboUI      = GetComponent <ComboCounter>();
        consumeCheck = GetComponent <EnemyHealthManager>();
        consuming    = false;
        healthCheck  = gameObject.GetComponent <PlayerHealth>();
        RightConsumeBox.SetActive(false);
        anim        = GetComponent <Animator> ();
        skillScript = GetComponent <PlayerSkill> ();
        GameObject iconsHolder = GameObject.Find("HUDCanvas/AbilityIcons");

        consumeIcon = iconsHolder.transform.GetChild(4).GetComponent <IconCoolDown>();
    }