예제 #1
0
 // Start is called before the first frame update
 void Start()
 {
     textRef.enabled = false;
     playerContRef   = PlayerCharacterController.request();
     paintContRef    = PaintController.request();
     playerContRef.endGame.AddListener(runEnded);
 }
예제 #2
0
 // Start is called before the first frame update
 void Start()
 {
     characterContRef = PlayerCharacterController.request();
     rb = gameObject.GetComponent <Rigidbody>();
     previousConstraints = rb.constraints;
     animRef             = gameObject.GetComponent <Animator>();
     respawnRef          = gameObject.GetComponent <RespawnSystem>();
 }
 // Start is called before the first frame update
 void Start()
 {
     playerRef = PlayerCharacterController.request();
     animRef   = gameObject.GetComponent <AnimationController>();
     playerRef.startGame.AddListener(gameStarted);
     targetPos   = GameObject.FindGameObjectWithTag("FinishLine").transform.position;
     targetPos.x = gameObject.transform.position.x;
     navMeshRef  = gameObject.GetComponent <NavMeshAgent>();
     rb          = gameObject.GetComponent <Rigidbody>();
 }
예제 #4
0
 // Start is called before the first frame update
 void Start()
 {
     respawnPoint     = gameObject.transform.position;
     characterContRef = PlayerCharacterController.request();
     animRef          = gameObject.GetComponent <AnimationController>();
     if (gameObject.CompareTag("AI"))
     {
         aiControllerRef = gameObject.GetComponent <AICharacterController>();
     }
     else
     {
         deathCam.Follow = null;
     }
 }
예제 #5
0
    // Start is called before the first frame update
    void Start()
    {
        rb               = gameObject.GetComponent <Rigidbody>();
        collider         = gameObject.GetComponent <Collider>();
        characterContRef = PlayerCharacterController.request();
        animRef          = gameObject.GetComponent <Animator>();

        Transform[] trans = gameObject.GetComponentsInChildren <Transform>();
        foreach (Transform t in trans)
        {
            if (t.CompareTag("PelvisBone"))
            {
                pelvis = t.gameObject;
            }
        }
        if (gameObject.CompareTag("AI"))
        {
            navMeshRef      = gameObject.GetComponent <NavMeshAgent>();
            aiControllerRef = gameObject.GetComponent <AICharacterController>();
        }

        deActivateRagdoll();
    }