Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using JeffreyStephens;
- using JeffreyStephens.Game;
- using JeffreyStephens.Weapons;
- using UnityEngine;
- /// <summary>
- /// Create a blank GameObject in the scene and attach this script by dragging it onto the gameobject in the hierarchy.
- /// </summary>
- public class TestScript : MonoBehaviour
- {
- public WeaponManager WeaponManager;
- void Start ( )
- {
- WeaponManager = new WeaponManager ( );
- WeaponManager.AddWeapon ( "FireBlade", new Weapon ( )
- {
- Accuracy = 10,
- Damage = 5,
- Element = ElementType.Fire,
- WeaponModel = null
- } );
- WeaponManager.AddWeapon ( "IceBlade", new Weapon ( )
- {
- Accuracy = 10,
- Damage = 5,
- Element = ElementType.Water,
- WeaponModel = null
- } );
- var fireblade = WeaponManager.GetWeapon ( "FireBlade" );
- Debug.Log ( $"fireblade.Accuracy = {fireblade.Accuracy}" );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment