Ejemplo n.º 1
0
 public void Initialize()
 {
     playerGroup  = ModelLoader.LoadModel <PlayerGroup>("PlayerGroup");
     neutralGroup = ModelLoader.LoadModel <NeutralGroup>("NeutralGroup");
     CreateAIs();
     cameraControl = new CameraMovementController(playerGroup);
     scores.Initialize(aiGroups.Union(new Group[] { playerGroup }));
 }
 // Use this for initialization
 void Start()
 {
     DestroyCount = 0;
     SpawnCount   = 0;
     pmc          = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMovementController>();
     CF           = GameObject.FindGameObjectWithTag("CameraBase").GetComponent <CameraFollow>();
     CMC          = GameObject.FindGameObjectWithTag("CameraTarget").GetComponent <CameraMovementController>();
     GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerSoundController>().PlayFlamethrower();
 }
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else if (Instance != null)
     {
         Destroy(this);
     }
 }
        public void OnExitReplayEditor()
        {
            base.enabled = false;
            PlayerController.Instance.cameraController._actualCam.SetParent(this.cameraParent);
            CameraMovementController cameraMovementController = UnityEngine.Object.FindObjectOfType <CameraMovementController>();

            if (cameraMovementController)
            {
                cameraMovementController.enabled = true;
            }
            camera.fieldOfView = defaultCameraFOV;
        }
Ejemplo n.º 5
0
 void Awake()
 {
     //EndPortal Resource
     EndPortal = Resources.Load("Objects/EndPortalEffect") as GameObject;
     //TODO DEFINE KEY KEY=Resources.Load("Objects/KEY") as GameObject;
     //Init First Level
     if (!DebugLevel)
     {
         LevelID = PlayerPrefs.GetInt("currentLevelID");
     }
     Player = GetComponent <PlayerMovementController>();
     Cam    = GetComponent <CameraMovementController>();
     Mirror = GetComponent <MirrorFollow>();
     InitLevel();
 }
Ejemplo n.º 6
0
    void Start()
    {
        moveController = GetComponent <CameraMovementController>();
        moveController.MoveCameraLeft  += OnMoveLeft;
        moveController.MoveCameraRight += OnMoveRight;
        moveController.MoveCameraUp    += OnMoveUp;
        moveController.MoveCameraDown  += OnMoveDown;

        moveController.RotateCameraLeft  += OnRotateLeft;
        moveController.RotateCameraRight += OnRotateRight;

        moveController.ZoomCamera += OnZoomCamera;

        cameraPosTracker = GetComponentInParent <PositionTracker>().transform;
    }
        public void OnStartReplayEditor()
        {
            while (this.keyFrames.Count > 0 && this.keyFrames[0].time < this.manager.recorder.startTime)
            {
                this.keyFrames.RemoveAt(0);
            }
            base.enabled = true;
            if (this.mode == CameraMode.Orbit)
            {
                this.orbitRadialCoord = new Vector3Radial(this.cameraTransform.position - PlayerController.Instance.skaterController.skaterTransform.position);
            }
            this.cameraParent = this.cameraTransform.parent;
            PlayerController.Instance.cameraController._actualCam.SetParent(null);
            CameraMovementController cameraMovementController = UnityEngine.Object.FindObjectOfType <CameraMovementController>();

            if (cameraMovementController)
            {
                cameraMovementController.enabled = false;
            }
            defaultCameraFOV = camera.fieldOfView;
        }
 void Start()
 {
     cameraMovement = GameObject.FindGameObjectWithTag("CameraTarget").GetComponent <CameraMovementController>();
 }