Exemple #1
0
    public void setShipImage(ShipDefinitions.ShipType type)
    {
        ImageHost imgHost = GameObject.Find("GameLogic").GetComponent <ImageHost>();

        switch (type)
        {
        case ShipDefinitions.ShipType.Ruby:
            shipImage.GetComponent <UnityEngine.UI.Image>().sprite = imgHost.shipRuby;
            break;

        case ShipDefinitions.ShipType.Peacock:
            shipImage.GetComponent <UnityEngine.UI.Image>().sprite = imgHost.shipPeacock;
            break;
        }
    }
Exemple #2
0
 public void setShipType(ShipDefinitions.ShipType type)
 {
     shipType = type;
 }