예제 #1
0
    public void DisableSkillPick()
    {
        if (!enable)
        {
            return;
        }

        int sCount = target.skills.Count;

        for (int i = 0; i < sCount; ++i)
        {
            GameObject s = skillPicks[i];
            MOMove     m = s.AddComponent <MOMove>();
            if (sCount == 1 && target.faction == GameManager.FACTION_RED)
            {
                m.Initialize(s, ANIMATION_TIME - 0.05f, PICKPOS[PICKPOS_ZONE[sCount - 1, 1]], PICKPOS[4], 1.0f, false, true);
            }
            else
            {
                m.Initialize(s, ANIMATION_TIME - 0.05f, PICKPOS[PICKPOS_ZONE[sCount - 1, i]], PICKPOS[4], 1.0f, false, true);
            }
            MOOpacity o = s.AddComponent <MOOpacity>();
            o.Initialize(s, MOOpacity.RendererType.Image, ANIMATION_TIME, 1.0f, 0.0f, 1.0f);
            if (i == 0)
            {
                o.AddOnMotionEnd(new Motion.MotionEvent(DisableSkillPickCallBack));
            }
        }
        enable = false;
    }
예제 #2
0
    public void EnableSkillPick(Unit _target)
    {
        if (enable)
        {
            return;
        }

        target = _target;
        int sCount = target.skills.Count;

        for (int i = 0; i < sCount; ++i)
        {
            GameObject s = skillPicks[i];
            MOMove     m = s.AddComponent <MOMove>();
            if (sCount == 1 && target.faction == GameManager.FACTION_RED)
            {
                m.Initialize(s, ANIMATION_TIME - 0.05f, PICKPOS[4], PICKPOS[PICKPOS_ZONE[sCount - 1, 1]], 1.0f, false, true);
            }
            else
            {
                m.Initialize(s, ANIMATION_TIME - 0.05f, PICKPOS[4], PICKPOS[PICKPOS_ZONE[sCount - 1, i]], 1.0f, false, true);
            }
            MOOpacity o = s.AddComponent <MOOpacity>();
            o.Initialize(s, MOOpacity.RendererType.Image, ANIMATION_TIME, 0.0f, 1.0f, 1.0f);
            s.SetActive(true);
        }
        enable = true;
        CameraManager.Instance.FocusUnit(target);
    }