Advertisement
shadowplaycoding

P017_Fleet

Apr 29th, 2017
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.67 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4.  
  5. public class Fleet {
  6.  
  7.     public List<Ship> ships;
  8.     public string fleetName { get; set; }
  9.  
  10.     public Fleet(string name, Ship ship)
  11.     {
  12.         this.fleetName = name;
  13.         ships = new List<Ship>();
  14.         ships.Add(ship);
  15.     }
  16.  
  17.     public void AddShip(Ship ship)
  18.     {
  19.         ships.Add(ship);
  20.     }
  21.  
  22.     public void RemoveShip(Ship ship)
  23.     {
  24.         ships.Remove(ship);
  25.     }
  26.  
  27.     /*
  28.     Copyright Shadowplay Coding 2017 - see www.shadowplaycoding.com for licensing details
  29.     Removing this comment forfits any rights given to the user under licensing.
  30.     */
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement