コード例 #1
0
 void Awake()
 {
     Instance = this;
     moveCtrl = GetComponent <SimpleMoveCtrl>();
     animMgr  = GetComponent <PlayerAnimatorMgr>();
     if (moveCtrl == null)
     {
         GameTools.LogError("Player Con not move due to Don't attack SimplaMoveCrlt");
         isAbleMove = false;
     }
 }
コード例 #2
0
    void Start()
    {
        skillDict     = new Dictionary <int, SkillItem>();
        skillCtrlDict = new Dictionary <int, SkillBase>();
        if (animMgr == null)
        {
            animMgr = PlayerFightCtrl.Instance.AnimMgr;
        }

        List <SkillItem> skills = new List <SkillItem>();
        SkillItem        skill  = new SkillItem();

        skill.ColdTime = 10;
        skill.Icon     = "icon_li";
        skill.Type     = "Skill";
        skill.Pos      = "one";
        skill.SkillID  = 4444;
        skills.Add(skill);

        skill          = new SkillItem();
        skill.ColdTime = 15;
        skill.Icon     = "iocn_ho";
        skill.Type     = "Skill";
        skill.Pos      = "two";
        skill.SkillID  = 333;
        skills.Add(skill);


        skill          = new SkillItem();
        skill.ColdTime = 20;
        skill.Icon     = "iocn_fo";
        skill.Type     = "Skill";
        skill.Pos      = "three";
        skill.SkillID  = 222;
        skills.Add(skill);

        skill          = new SkillItem();
        skill.ColdTime = 0;
        skill.Icon     = "iocn_yi";
        skill.Type     = "Base";
        skill.Pos      = "basic";
        skill.SkillID  = 111;
        skills.Add(skill);

        //this.GetChild("Skill-item").GetComponent<SkillBase>().ReviceSkillInfo(skill);
        InitState(skills);
    }
コード例 #3
0
 public void InitState()
 {
     SetControlGO();
     animMgr = PlayerFightCtrl.Instance.AnimMgr;
     ctrlGO.GetChild("s_icon").Value = this.skillInfo.Icon;
     ctrlGO.GetChild("s_fore").Value = this.skillInfo.Icon;
     if (skillInfo.Type == "Base")
     {
         cdSprite.gameObject.SetActive(false);
         needCD = false;
         isCD   = false;
     }
     else
     {
         needCD = true;
         isCD   = true;
     }
     curCDTime = 0;
     isInit    = true;
 }