示例#1
0
    //IEnumerator  SpawnMaskGhost()
    //   {
    //       //HeartBeatEmg();
    //       CurHeartState = EHeartState.EHS_Find;
    //       m_Tip.gameObject.SetActive(true);
    //       m_Tip.text = m_tipslist.Count > 0 ? m_tipslist[0] : string.Empty;

    //       m_AirGyroController.EnableGyro( false );

    //       if ( m_PreSpawnGhostEffect != null )
    //		m_PreSpawnGhostEffect.gameObject.SetActive (true);

    //	yield return new WaitForSeconds (m_PreSpawnGhostEffectTime);

    //       //StartCoroutine(MobileVibrate());
    //       StartCoroutine(SearchingMaskGhost());
    //       m_Ghost.m_ghostState = DragonGhost.EGhostState.EGS_CATCHABLE;
    //       yield break;
    //   }

    void CatchedGhost(DragonGhost ghost)
    {
        ghost.m_ghostState = DragonGhost.EGhostState.EGS_CATCHED;
        m_GhostStateList[m_curGhostIndex] = DragonGhost.EGhostState.EGS_CATCHED;
        m_curCatchGhostTime = ghost.m_attacktime - Time.deltaTime * 3;

        DragonAchievementManager.Instance().OnCatchGhost(ghost.m_nGhostID);
    }
示例#2
0
    void _CreateAirGhost()
    {
        int         ghostid = GetAirGhostID();
        stGhostItem item    = GhostItemManager <stGhostItem> .Instance().GetstItem(ghostid);

        if (item != null)
        {
            m_AirGhost = m_AirGhostManager.GetGhost(item);
        }
    }
示例#3
0
    public void AdjustMoveGhost(DragonGhost ghost, float speed, Transform flytarget)
    {
        Vector3    pos    = ghost.transform.localPosition;
        Quaternion rot    = ghost.transform.localRotation;
        Quaternion target = flytarget.rotation;

        pos = Vector3.MoveTowards(pos, Vector3.zero, speed * Time.deltaTime);
        rot = Quaternion.Slerp(rot, Quaternion.identity, speed * Time.deltaTime);
        ghost.transform.localPosition = pos;
        ghost.transform.localRotation = rot;
    }