public void SetUtilityWeapon(RobotWeapon weapon) { if (unlockedWeapons.Contains(weapon)) { utilityWeapon = weapon; } }
public void SetMainWeapon(RobotWeapon weapon) { if (unlockedWeapons.Contains(weapon)) { mainWeapon = weapon; } }
protected virtual void Start() { robotController = GetComponent <RobotController>(); robotCharacter = GetComponent <RobotCharacter>(); robotWeapon = GetComponent <RobotWeapon>(); robotMovement = GetComponent <RobotMovement>(); }
private void EquipWeapons() { if (frontWeaponObject != null) { frontWeaponObject.gameObject.SetActive(false); } if (backWeaponObject != null) { backWeaponObject.gameObject.SetActive(false); } RobotWeaponsManager weaponsManager = RobotWeaponsManager.Instance; RobotWeapon frontWeapon = weaponsManager.FrontWeapon; if (frontWeapon != null) { frontWeaponObject = Instantiate(weaponsManager.FrontWeapon.prefab, configuration.FrontWeaponPosition.position, Quaternion.identity, transform); frontWeaponObject.EquipToPlayer(gameObject); } else { Debug.Log("no front weapon equipped, not instantiating"); } RobotWeapon backWeapon = weaponsManager.BackWeapon; if (backWeapon != null) { backWeaponObject = Instantiate(weaponsManager.BackWeapon.prefab, configuration.BackWeaponPosition.position, Quaternion.identity, transform); backWeaponObject.EquipToPlayer(gameObject); } else { Debug.Log("no back weapon equipped, not instantiating"); } }
public void UnlockWeapon(RobotWeapon weapon) { unlockedWeapons.Add(weapon); }
public WeaponPickerElement(RobotWeapon weapon, GameObject instance) { this.instance = instance; this.weapon = weapon; }