Exemple #1
0
        // Use this for initialization
        void Start()
        {
            GameSystem.GamePaused = false;
            //setup the camera
            //if we haven't been passed a rigidbody, lookup one in our children
            movedCurr = false;
            movedPrev = false;
            shivCurr = false;
            shivPrev = false;
            handsUpCurr = false;
            handsUpPrev = false;
            rotatedCurr = false;
            rotatedPrev = false;
            jumpCurr = false;
            jumpPrev = false;
            if (ActorCamera != null)
            {
                audioDev = ActorCamera.GetComponentInChildren<AudioListener>();
            }
            //get info from the network if available.
            if (ActorCtrl.IsNetworked)
            {
                if (ActorCtrl.IsClientControlled)
                {
                    networkID = Matchmaker.GetPlayerNum();
                }
            }
            ReloadActor();
            //add ourselves to the AI system
            aiManager = AIManager.GetInstance();
            aiManager.AddMaster(this);

            //we don't want the friggin' mouse moving around!
            Screen.lockCursor = true;
        }