Exemplo n.º 1
0
	public void MountWeapon(Weapon weaponPrefab)
	{
		if (weaponPrefab == null)
			return;

		Destroy(WeaponInst);
		WeaponInst = Instantiate(weaponPrefab);
		WeaponInst.transform.parent = MountPoint.transform;
		WeaponInst.transform.localPosition = Vector3.zero;
		WeaponInst.transform.localRotation = Quaternion.identity;

		WeaponInst.Mount(entity);
	}