Пример #1
0
 public override void Initialize()
 {
     base.Initialize();
     iceAbility             = player.GetComponent <IceAbility>();
     iceThunderFreezingZone = GameObject.Find("IceThunderFreezingZone").GetComponents <BoxCollider2D>();
     if (iceThunderFreezingZone == null)
     {
         Debug.LogError("iceThunderFreezingZone为空");
     }
 }
Пример #2
0
    public override void Initialize()
    {
        base.Initialize();
        spellName = IceArrow.ICE_ARROW;
        playerAnim.SetSpell(this, SkillType.IceShot);

        iceAbility          = player.GetComponent <IceAbility>();
        iceShotFreezingZone = GameObject.Find("IceShotFreezingZone").GetComponent <BoxCollider2D>();
        if (iceShotFreezingZone == null)
        {
            Debug.LogError("iceShotFreezingZone为空");
        }
    }
Пример #3
0
 public override void Initialize()
 {
     base.Initialize();
     iceShieldColl  = GameObject.Find("IceShieldCollider");
     iceShieldColl1 = GameObject.Find("IceShieldCollider1");
     iceShieldColl2 = GameObject.Find("IceShieldCollider2");
     iceShieldColl3 = GameObject.Find("IceShieldCollider3");
     //iceShield = GameObject.Find("IceShield");
     //iceShield.SetActive(false);
     //playerAnim.SetSpell(this, SkillType.IceShield);
     iceAbility = player.GetComponent <IceAbility>();
     IceShieldMashFreezingZone = GameObject.Find("IceShieldMashFreezingZone").GetComponent <BoxCollider2D>();
     if (IceShieldMashFreezingZone == null)
     {
         Debug.LogError("IceShieldMashFreezingZone为空");
     }
 }
Пример #4
0
    //StringBuilder targetsName = new StringBuilder();
    public override void Initialize()
    {
        base.Initialize();
        normalAttackArea = GameObject.Find("NormalAttack").GetComponent<Collider2D>();
        canFight = player.GetComponent<CanFight>();
        //使用string数组初始化canFight能够检测到的层
        string[] targets = new string[1];
        targets[0] = targetLayerName;
        canFight.Initiailize(targets);
        playerAnim.SetSpell(this, SkillType.IceSword);

        iceAbility = player.GetComponent<IceAbility>();
        iceShotFreezingZone = GameObject.Find("IceShotFreezingZone").GetComponent<BoxCollider2D>();
        if (iceShotFreezingZone == null)
        {
            Debug.LogError("iceShotFreezingZone为空");
        }
    }
Пример #5
0
    private void Awake()
    {
        fireAbility    = GetComponent <FireAbility>();
        thunderAbility = GetComponent <ThunderAbility>();
        iceAbility     = GetComponent <IceAbility>();
        windAbility    = GetComponent <WindAbility>();

        debugInfoUI = GameObject.Find("PlayerAbilityDebugInfo").GetComponent <Text>();
        if (debugInfoUI == null)
        {
            Debug.LogError("没找到PlayerAbilityDebugInfo这个ui物体");
        }

        elementSwitch = GameObject.Find("ElementSwitch").GetComponent <ElementSwitch>();
        if (elementSwitch == null)
        {
            Debug.LogError("没找到elementSwitch这个ui物体");
        }
    }