コード例 #1
0
 void Awake()
 {
     rpgCharacterController = GetComponent <RPGCharacterControllerFREE>();
     //Find the Animator component.
     animator = GetComponentInChildren <Animator>();
     StartCoroutine(_HideAllWeapons(false, false));
 }
コード例 #2
0
 public void Die()
 {
     rpgCharacterController = gameObject.GetComponent <RPGCharacterAnims.RPGCharacterControllerFREE>();
     animator = gameObject.GetComponent <Animator>();
     gameObject.GetComponent <RPGCharacterAnims.RPGCharacterInputControllerFREE>().enabled = false;
     rpgCharacterController.movementAnimationSpeed = 0f;
     animator.SetTrigger("Death1Trigger");
 }
コード例 #3
0
 void Awake()
 {
     superCharacterController    = GetComponent <SuperCharacterController>();
     rpgCharacterController      = GetComponent <RPGCharacterControllerFREE>();
     rpgCharacterInputController = GetComponent <RPGCharacterInputController>();
     navMeshAgent = GetComponent <UnityEngine.AI.NavMeshAgent>();
     animator     = GetComponentInChildren <Animator>();
     rb           = GetComponent <Rigidbody>();
     if (rb != null)
     {
         //Set restraints on startup if using Rigidbody.
         rb.constraints = RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationZ;
     }
     //Set currentState to idle on startup.
     currentState      = RPGCharacterState.Idle;
     rpgCharacterState = RPGCharacterState.Idle;
 }
コード例 #4
0
ファイル: GUIControlsFREE.cs プロジェクト: MrLoog/LChess
 void Awake()
 {
     rpgCharacterController         = GetComponent <RPGCharacterControllerFREE>();
     rpgCharacterMovementController = GetComponent <RPGCharacterMovementControllerFREE>();
 }
コード例 #5
0
 // Start is called before the first frame update
 void Start()
 {
     InvokeRepeating("Attack", 1f, 2.5f);
     rpgCharacterController = GetComponent <RPGCharacterControllerFREE>();
 }
コード例 #6
0
 // Start is called before the first frame update
 void Start()
 {
     InvokeRepeating("Attack", 1f, Random.Range(0.25f, 5f));
     rpgCharacterController         = GetComponent <RPGCharacterControllerFREE>();
     rpgCharacterMovementController = GetComponent <RPGCharacterMovementControllerFREE>();
 }
コード例 #7
0
 void Awake()
 {
     rpgCharacterController = player.GetComponent <RPGCharacterAnims.RPGCharacterControllerFREE>();
     playerManager          = GameObject.Find("GameManager").GetComponent <PlayerManager>();
     myStats = player.GetComponent <CharacterStats>();
 }
コード例 #8
0
 void Start()
 {
     rpgCharacterController = player.GetComponent <RPGCharacterAnims.RPGCharacterControllerFREE>();
 }