public void Convert(PlayerData playerData)
 {
     PlayerData = playerData;
     Dye();
     var shockwave = Prefabs.Instance.GetNewShockwave();
     shockwave.transform.position = transform.position;
     shockwave.GetComponent<DetonatorShockwave>().color = PlayerData.color;
 }
        public void Start()
        {
            AttackSpeed = 1f; Random.Range(1f,2f);
            AttackDamage = 2f; // Random.Range(1.7f,2.5f);
            if (Game.IsSinglePlayer())
            {
                uid = UidGenerator.GetNewUid();
            }

			PlayerData = Registry.Player [PlayerData.uid].GetComponent<PlayerData> ();

           	GetComponentInChildren<Renderer>().material.color = PlayerData.color;
        }
        public void Start() {

            // debug singleplayer
//            if (Uid == 0)
//            {
//                Uid = UidGenerator.GetNewUid();
//                Registry.Islands.Add(Uid, gameObject);
//                SpawnRate = 3;
//            }

            PlayerData = Registry.Player[PlayerData.uid].GetComponent<PlayerData>();

            CurrentRespawnRate = SpawnRate;

			Dye ();
        }
 public static GameObject CreateShip(int uid, int type, PlayerData.PlayerType playerType)
 {
     GameObject go;
     switch (playerType)
     {
         case PlayerData.PlayerType.Offensive: 
             go = Prefabs.Instance.GetNewSteelShip();
             break;
         case PlayerData.PlayerType.Player:
             go = Prefabs.Instance.GetNewPapership();
             break;
         default:
             go = Prefabs.Instance.GetNewPapership();
             break;
     }
     Registry.Ships.Add(uid, go);
     return go;
 }
		public void Start() 
		{
            fsm = GetComponent<PlayMakerFSM>();
            playerData = GetComponent<PlayerData>();
		}