Ejemplo n.º 1
0
    private void OnEnable()
    {
        chatacter = GetComponent <LChatacter>();
        chatacter.EnableAI();


        CDParams _params = new CDParams();

        CDData[] cds = new CDData[1] {
            new CDData()
        };
        cds[0].cd   = cd;
        _params.cds = cds;
        cdName      = "cd_" + skillName;
        chatacter.AddParam(cdName, _params);


        a.SkillId  = skillName;
        a.priority = priority;

        a.skillState = 0;
        a.cdState    = CdState.NORMAL;
        a.cdName     = cdName;
        chatacter.AddAction(a);
    }
Ejemplo n.º 2
0
 public void AddParam(string cdName, CDParams _params)
 {
     if (cds.ContainsKey(cdName))
     {
         var c = cds[cdName];
         cdsList.Remove(c);
         cds.Remove(cdName);
     }
     cdsList.Add(_params);
     cds[cdName] = _params;
 }
Ejemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        if (skills.Length == 0)
        {
            return;
        }
        LChatacter chatacter = GetComponent <LChatacter>();
        CDParams   _params   = new CDParams();

        _params.cds = skills;
        chatacter.AddParam(cdName, _params);
        for (int i = 0; i < skills.Length; i++)
        {
            LCharacterSkillAction a = new LCharacterSkillAction();
            a.SkillId    = skills[i].skillId;
            a.priority   = priority;
            a.button     = button;
            a.cdState    = state;
            a.cdName     = cdName;
            a.skillState = i;
            chatacter.AddAction(a);
        }
    }
Ejemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        LChatacter            chatacter = GetComponent <LChatacter>();
        LCharacterSkillAction a         = new LCharacterSkillAction();

        CDParams _params = new CDParams();

        CDData[] cds = new CDData[1] {
            new CDData()
        };
        cds[0].cd   = cd;
        _params.cds = cds;
        string cdName = "cd_" + skillName;

        chatacter.AddParam(cdName, _params);

        a.SkillId    = skillName;
        a.priority   = priority;
        a.button     = button;
        a.skillState = 0;
        a.cdState    = CdState.NORMAL;
        a.cdName     = cdName;
        chatacter.AddAction(a);
    }