Example #1
0
    public void Init(GameObject owner, GameObject img, int GID = 0, Skill_Mode SM = null, DamageAble DA = null, DisplayAttackLog log = null)
    {
        gameObject  = owner;
        m_CharImage = img;

        m_Destination = gameObject.transform.position;
        previousPos   = gameObject.transform.position;

        GroupId = GID;

        m_Mode = SM;
        if (m_Mode != null)
        {
            m_Mode.Init(this);
        }

        if (DA != null)
        {
            m_damage = DA;
        }
        else
        {
            m_damage = gameObject.GetComponent <DamageAble>();
        }

        if (m_damage)
        {
            m_damage.Init(m_Stats);
        }

        if (log != null)
        {
            m_attLog = log;
        }
        else
        {
            m_attLog = gameObject.GetComponent <DisplayAttackLog>();
        }
    }
Example #2
0
    public void ChangeMode(Skill_Mode mode)
    {
        m_Mode = mode;

        m_Destination = gameObject.transform.position;
    }