예제 #1
0
 void Start()
 {
     _charController = GetComponent <CharacterController>();
     mainCamera      = Camera.main.transform;
     cam             = mainCamera.GetComponent <CameraOrbit>();
     animator        = GetComponent <Animator>();
     weapon          = GetComponent <PlayerWeaponAndAttacks>();
 }
예제 #2
0
    protected override void Start()
    {
        base.Start();
        movementController = GetComponent <PlayerMovement>();
        battleController   = GetComponent <PlayerWeaponAndAttacks>();

        foreach (var ability in abilities)
        {
            ability.Initialize(this);
        }
    }
예제 #3
0
    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;
    }
예제 #4
0
    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);
        }
    }
예제 #5
0
 void Start()
 {
     weapon = GetComponent <PlayerWeaponAndAttacks>();
 }