Ejemplo n.º 1
0
    public void SetWeaponType(WeaponType weaponType)
    {
        this.weaponType = weaponType;

        switch (weaponType)
        {
        default:
        case WeaponType.Pistol:
            EnableAimSkeleton();
            characterAimBase.SetWeaponType(CharacterAim_Base.WeaponType.Pistol);
            break;

        case WeaponType.Shotgun:
            EnableAimSkeleton();
            characterAimBase.SetWeaponType(CharacterAim_Base.WeaponType.Shotgun);
            break;

        case WeaponType.Punch:
            EnableNormalSkeleton();
            playerPunch.enabled = true;
            playerSword.enabled = false;
            break;

        case WeaponType.Sword:
            EnableNormalSkeleton();
            playerPunch.enabled = false;
            playerSword.enabled = true;
            break;
        }
    }
Ejemplo n.º 2
0
 private void Start()
 {
     characterBase.SetWeaponType(CharacterAim_Base.WeaponType.Pistol);
     enemyMain.OnDestroySelf += EnemyMain_OnDestroySelf;
     enemyMain.HealthSystem.SetHealthMax(100, true);
 }