Esempio n. 1
0
    void Start()
    {
        //setup Controllstates
        _CrowIDLE = new CrowIDLE();
        _CrowFLY = new CrowFLY();
        _CrowDIE = new CrowDIE();

        state = _CrowIDLE;
        Initialize();
    }
Esempio n. 2
0
    void Start()
    {
        //setup Controllstates
        _ZombieIDLEDEATH = new ZombieIDLEDEATH();
        _ZombieSPAWN = new ZombieSPAWN();
        _ZombieIDLE = new ZombieIDLE();
        _ZombieRUN = new ZombieRUN();
        _ZombieSLIDE = new ZombieSLIDE();
        _ZombieJUMP = new ZombieJUMP();
        _ZombieFALL = new ZombieFALL();
        _ZombieWAIT = new ZombieWAIT();
        _ZombieDIE = new ZombieDIE();
        _ZombieATTACK = new ZombieATTACK();
        _ZombieATTACKB = new ZombieATTACKB();
        _ZombieATTACKC = new ZombieATTACKC();
        _ZombieGETHIT = new ZombieGETHIT();
        state = _ZombieIDLEDEATH;
        Initialize();

        stats.healthMax = 3;
        stats.healthCurrent = 3;
        stats.enduranceMax = 100;
        stats.enduranceCurrent = 50;
    }
Esempio n. 3
0
 protected void triggerEnter(Collider collider)
 {
     state = state.handleTriggerEnter(collider,_BThirdPerson, stats);
 }
Esempio n. 4
0
 protected void collisionStay(Collision collision)
 {
     state = state.handleCollissionStay(collision,_BThirdPerson, stats);
 }
Esempio n. 5
0
 protected void UpdateState()
 {
     state =  state.handleInput(_BThirdPerson,stats);
     state =  state.handleAnimation(_BThirdPersonMotionSystem);
     stateTime += Time.deltaTime;
     stats.updateStats();
     _BThirdPerson.stateTime = stateTime;
     _BThirdPersonMotionSystem.stateTime = stateTime;
 }
Esempio n. 6
0
    void Start()
    {
        //setup Controllstates
        _KnightIDLE = new KnightIDLE();
        _KnightIDLEONFIRE = new KnightIDLEONFIRE();
        _KnightRUN = new KnightRUN();
        _KnightSLIDE = new KnightSLIDE();
        _KnightJUMP = new KnightJUMP();
        _KnightFALL = new KnightFALL();
        _KnightWAIT = new KnightWAIT();
        _KnightDIE = new KnightDIE();
        _KnightATTACK = new KnightATTACK();
        _KnightATTACKB = new KnightATTACKB();
        _KnightATTACKC = new KnightATTACKC();
        _KnightSIT = new KnightSIT();
        _KnightSTANDUP = new KnightSTANDUP();
        _KnightGETHIT = new KnightGETHIT();

        state = _KnightSIT;
        KnightInventory = gameObject.GetComponent<CharacterInventory>();
        KnightStats = stats;
        Initialize();
        stats.healthMax = 5;
        stats.healthCurrent = 5;
        stats.enduranceMax = 100;
        stats.enduranceCurrent = 50;
    }
Esempio n. 7
0
        protected override void InitState()
        {
            //**
            SplashState m_SplashState = new SplashState(this);

            m_SplashState.AddTransition("FirstGame", "WelcomeState");
            m_SplashState.AddTransition("SecondGame", "SettingHint");
            AddState(m_SplashState);

            //**
            WelcomeState m_WelcomeState = new WelcomeState(this);

            m_WelcomeState.AddTransition("Enter", "SettingHint");
            m_WelcomeState.AddTransition("Back", "ExitFlowState");
            m_WelcomeState.AddTransition("Buy", "ByState");
            AddState(m_WelcomeState);

            //**
            ExitFlowState m_ExitFlowState = new ExitFlowState(this);

            AddState(m_ExitFlowState);

            //**
            SettingHint m_SettingHint = new SettingHint(this);

            m_SettingHint.AddTransition("HintDown", "DownApp");
            m_SettingHint.AddTransition("SettingEnd", "StateGame");
            m_SettingHint.AddTransition("Ctr", "ControllState");
            m_SettingHint.AddTransition("Usb", "UsbState");
            m_SettingHint.AddTransition("Beacon", "BeaconState");
            m_SettingHint.AddTransition("Back", "ExitFlowState");
            AddState(m_SettingHint);

            //**
            DownApp m_DownApp = new DownApp(this);

            AddState(m_DownApp);

            //**
            StateGame m_StateGame = new StateGame(this);

            m_StateGame.AddTransition("Start", "InPhone");
            AddState(m_StateGame);

            //**
            ControllState m_ControllState = new ControllState(this);

            m_ControllState.AddTransition("Usb", "UsbState");
            m_ControllState.AddTransition("Beacon", "BeaconState");
            m_ControllState.AddTransition("Back", "SettingHint");
            AddState(m_ControllState);

            //**
            UsbState m_UsbState = new UsbState(this);

            m_UsbState.AddTransition("Back", "SettingHint");
            m_UsbState.AddTransition("Ctr", "ControllState");
            m_UsbState.AddTransition("Beacon", "BeaconState");
            AddState(m_UsbState);

            //**
            BeaconState m_BeaconState = new BeaconState(this);

            m_BeaconState.AddTransition("Back", "SettingHint");
            m_BeaconState.AddTransition("Ctr", "ControllState");
            m_BeaconState.AddTransition("Usb", "UsbState");
            AddState(m_BeaconState);

            //**
            InPhone m_InPhone = new InPhone(this);

            AddState(m_InPhone);

            //**
            ByState m_ByState = new ByState(this);

            AddState(m_ByState);
            //**
        }