SHARE
TWEET

Untitled

a guest Jul 19th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class ItemModule : ScriptableObject
  6. {
  7.     public class CoreModule : ItemModule
  8.     {
  9.         public Vector2Int Size;
  10.         public float Mass;
  11.         public Resources Cost = new Resources(0,0,0);
  12.     }
  13.  
  14.     //Additional Modules
  15.     public class AdditionalModule : ItemModule
  16.     {
  17.         public Vector2 SizeMultiplier;
  18.         public float MassMultiplier;
  19.         public Resources Cost = new Resources(0,0,0);
  20.  
  21.         public AdditionalModule (Vector2 _SizeMultiplier, float _MassMultiplier, Resources _Cost)
  22.         {
  23.             SizeMultiplier = _SizeMultiplier;
  24.             MassMultiplier = _MassMultiplier;
  25.             Cost = _Cost;
  26.         }
  27.  
  28.         public class Plating : AdditionalModule
  29.         {
  30.             public float Thickness;
  31.             Material material;
  32.             public float Armour;
  33.  
  34.             public Plating(Vector2 _Size, float _Mass, Resources _Cost, float _Thickness, Material _material, float _Armour) : base(_Size, _Mass, _Cost)
  35.             {
  36.                 Thickness = _Thickness;
  37.                 material = _material;
  38.                 Armour = _Armour;
  39.                 material = _material;
  40.             }
  41.         }
  42.  
  43.         public class Reactor : AdditionalModule
  44.         {
  45.             public float Power;
  46.  
  47.             public Reactor(Vector2 _Size, float _Mass, Resources _Cost, float _Power) : base(_Size, _Mass, _Cost)
  48.             {
  49.                 Power = _Power;
  50.             }
  51.         }
  52.  
  53.         public class Shielding : AdditionalModule
  54.         {
  55.             public float Shield;
  56.             public float PowerUsage;
  57.             public Shielding(Vector2 _Size, float _Mass, Resources _Cost, float _Shield, float _PowerUsage) : base(_Size, _Mass, _Cost)
  58.             {
  59.                 Shield = _Shield;
  60.                 PowerUsage = _PowerUsage;
  61.             }
  62.         }
  63.     }
  64. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top