void Start() { _charController = GetComponent <CharacterController>(); mainCamera = Camera.main.transform; cam = mainCamera.GetComponent <CameraOrbit>(); animator = GetComponent <Animator>(); weapon = GetComponent <PlayerWeaponAndAttacks>(); }
protected override void Start() { base.Start(); movementController = GetComponent <PlayerMovement>(); battleController = GetComponent <PlayerWeaponAndAttacks>(); foreach (var ability in abilities) { ability.Initialize(this); } }
public virtual void Equip(PlayerWeaponAndAttacks weapon) { //TO DO: Set Models weapon.equipedWeapon = this; weapon.EquipedWeaponName = name; if (EquipSounds != null) { audioController.PlaySound(EquipSounds); } if (rightHandModel) { rightHandModel.SetActive(true); } if (leftHandModel) { leftHandModel.SetActive(true); } //player.GetComponent<Animator>().runtimeAnimatorController = weaponAC; //weapon.eqipedWeapon = weaponAttacks; }
protected override void Start() { base.Start(); if (instance == null) { instance = this; } else { DestroyImmediate(this); } movementController = GetComponent <PlayerMovement>(); battleController = GetComponent <PlayerWeaponAndAttacks>(); foreach (var ability in abilities) { ability.Initialize(this); } }
void Start() { weapon = GetComponent <PlayerWeaponAndAttacks>(); }