Пример #1
0
 public override void Initialize()
 {
     base.Initialize();
     thunderAbility  = player.GetComponent <ThunderAbility>();
     thunderLongMain = GameObject.Find("ThunderLongMain");
     playerAnim.SetSpell(this, SkillType.ThunderLong);
 }
Пример #2
0
 private void Awake()
 {
     player         = GameObject.Find("Player");
     thunderAbility = player.GetComponent <ThunderAbility>();
     playerHand     = player.GetComponent <CanFight>();
     nextTarget     = player;
 }
Пример #3
0
 public override void Initialize()
 {
     base.Initialize();
     playerAnim.SetSpell(this, SkillType.IceBlink);
     thunderAbility = player.GetComponent <ThunderAbility>();
     movementPlayer = player.GetComponent <MovementPlayer>();
     canFight       = player.GetComponent <CanFight>();
 }
Пример #4
0
    public override void Initialize()
    {
        base.Initialize();
        thunderLinkScript = GameObject.Find("ThunderLink").GetComponent <ThunderLink>();
        thunderLinkScript.SetCanFight(player.GetComponent <CanFight>());
        thunderLinkScript.gameObject.SetActive(false);
        if (thunderLinkScript == null)
        {
            Debug.LogError("在ThunderLinkSpell中,没找到闪电链物体脚本!");
        }

        thunderAbility = player.GetComponent <ThunderAbility>();
        if (thunderAbility == null)
        {
            Debug.LogError("在ThunderLinkSpell中,没找到雷属性技能脚本!");
        }
        playerAnim.SetSpell(this, SkillType.ThunderFire);
    }
Пример #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物体");
        }
    }