コード例 #1
0
ファイル: GhostMain.cs プロジェクト: Show-Kondou/AimProject
    // Use this for initialization
    void Start()
    {
        m_showBuff      = 1;
        m_viewStatus    = GHOTS_VIEW_STATUS.INVISIBLE;
        m_pStateMachine = new CStateMachine <GhostMain>(this);
        m_animator      = this.GetComponent <Animator>();
        m_pStateMachine.SetCurrentState(CGhostState_Main.Instance());
        m_pStateMachine.SetGlobalStateState(CGhostState_Wait.Instance());
        m_nowDunmmyNum      = m_maxDunmmyNum;
        dGhost              = new GameObject[3];
        GhostScore          = new SGhostScore();
        GhostScore.hitCandy = 0;
        GhostScore.knockOut = 0;
        int count = 1;

        foreach (Transform i in this.transform)
        {
            if (i.name == ("ghostkodomo_" + count.ToString()))
            {
                dGhost[count - 1] = i.gameObject;
                count++;
            }
            if (i.name == "GhostMeshParticle")
            {
                m_movepatincle = i.GetComponent <ParticleSystem>();
            }
        }
    }
コード例 #2
0
ファイル: GhostState.cs プロジェクト: Show-Kondou/AimProject
    public static CGhostState_Wait Instance()
    {
        if (instance == null)
        {
            instance = new CGhostState_Wait();
        }

        return(instance);
    }
コード例 #3
0
ファイル: CSyncGhost.cs プロジェクト: Show-Kondou/AimProject
    void UpdateServer()
    {
        switch (m_status)
        {
        case (int)GhostStateID.MAIN:

            m_ghostMain.m_pStateMachine.ChangeState(CGhostState_Main.Instance());
            break;

        case (int)GhostStateID.ATK:

            m_ghostMain.m_pStateMachine.ChangeState(CGhostState_Atk.Instance());
            break;

        case (int)GhostStateID.AVATAR:

            m_ghostMain.m_pStateMachine.ChangeState(CGhostState_Avatar.Instance());
            break;

        case (int)GhostStateID.DASH:

            m_ghostMain.m_pStateMachine.ChangeState(CGhostState_Dash.Instance());
            break;

        case (int)GhostStateID.MOVE:

            m_ghostMain.m_pStateMachine.ChangeState(CGhostState_Move.Instance());
            break;

        case (int)GhostStateID.SLOW:

            m_ghostMain.m_pStateMachine.ChangeState(CGhostState_Slow.Instance());
            break;

        case (int)GhostStateID.STAN:

            m_ghostMain.m_pStateMachine.ChangeState(CGhostState_Stan.Instance());
            break;

        case (int)GhostStateID.WAIT:

            m_ghostMain.m_pStateMachine.ChangeState(CGhostState_Wait.Instance());
            break;
        }
    }