Exemplo n.º 1
0
    private IEnumerator EndGame()
    {
        // 关掉输入和移动
        TouchManager.TouchEnable = false;
        GameObject player = GetPlayer();

        if (null != player)
        {
            SharedGameObjectInfo info = LogicSystem.GetSharedGameObjectInfo(gameObject);
            if (null != info)
            {
                LogicSystem.PublishLogicEvent("ge_set_ai_enable", "ai", info.m_LogicObjectId, false);
            }
        }
        // 慢放 3s
        Time.timeScale = 0.1f;
        yield return(new WaitForSeconds(0.3f));

        Time.timeScale = 1.0f;
        // stage clear
        OnStageClear();
        player = GetPlayer();
        if (null != player)
        {
            BaseSkillManager bsm = player.GetComponent <BaseSkillManager>();
            if (null != bsm)
            {
                if (!bsm.IsUsingSkill())
                {
                }
                else
                {
                    SkillControllerInterface sc = bsm.GetSkillController();
                    if (null != sc)
                    {
                        sc.ForceStopCurSkill();
                    }
                }
            }
        }
        yield return(new WaitForSeconds(0.9f));

        // 耍帅动作
        GameObject gfxGameRoot   = GameObject.Find("GfxGameRoot");
        MainCamera cameraControl = gfxGameRoot.GetComponent <MainCamera>();

        cameraControl.m_Distance = 10.0f;
        cameraControl.m_Height   = 7.0f;
        player = GetPlayer();
        if (null != player)
        {
            player.GetComponent <Animation>().PlayQueued("jianshi_shenguizhan_01", QueueMode.PlayNow);
        }
        yield return(new WaitForSeconds(1.2f));

        cameraControl.m_Distance = 12.5f;
        cameraControl.m_Height   = 7.9f;
        TouchManager.TouchEnable = true;
        OnShieldSword();
    }
Exemplo n.º 2
0
 private bool IsUsingSkill()
 {
     if (m_SkillManager != null && m_SkillManager.IsUsingSkill())
     {
         return(true);
     }
     return(false);
 }
Exemplo n.º 3
0
    private void BreakCurSkill(GameObject obj)
    {
        BaseSkillManager bsm = obj.GetComponent <BaseSkillManager>();

        if (null != bsm)
        {
            if (!bsm.IsUsingSkill())
            {
                return;
            }
            SkillControllerInterface sc = bsm.GetSkillController();
            if (null != sc)
            {
                sc.ForceStopCurSkill();
            }
        }
    }