예제 #1
0
 private void Start()
 {
     playerRigidbody                = GetComponent <Rigidbody>();
     gameManager                    = FindObjectOfType <OldGameManager>();
     uiTexts                        = FindObjectOfType <OldUITexts>();
     hasKilledTextCurrentTime       = hasKilledTextTime;
     hasBeenKilledTextCurrentTime   = hasBeenKilledTextTime;
     gameManager.myPlayerController = this;
 }
예제 #2
0
    private void CheckSingeltonInstance()
    {
        if (Instance != null)
        {
            Destroy(gameObject);
        }

        Instance = this;
        DontDestroyOnLoad(gameObject);
    }
예제 #3
0
 // Use this for initialization
 void Start()
 {
     GameManagerScript = GameManagerObject.GetComponent <OldGameManager>();
     playerTransform   = GetComponent <Transform>();
     cameraTransform   = CameraObject.GetComponent <Transform>();
     playerRigidBody   = GetComponent <Rigidbody>();
     playerCollider    = GetComponent <CapsuleCollider>();
     yaw   = playerTransform.eulerAngles.y;
     pitch = playerTransform.eulerAngles.x;
 }
예제 #4
0
    void Awake()
    {
        if (inst == null)
        {
            inst = this;
        }
        else if (inst != this)
        {
            Destroy(gameObject);
        }
        DontDestroyOnLoad(gameObject);

        if (isTesting)
        {
            return;
        }
    }