public void initSettings() { if (boat.GetComponent <ClickGUI>() == null) { clickScript = boat.AddComponent(typeof(ClickGUI)) as ClickGUI; clickScript.setBoat(this); } boat.transform.position = rightPort; coastName = "rightCoast"; leftOccupied = rightOccupied = false; }
public void initSettings() { if (character.GetComponent <ClickGUI>() == null) { clickScript = character.AddComponent(typeof(ClickGUI)) as ClickGUI; clickScript.setCharacter(this); } onBoat = false; seat = -1; coastName = "rightCoast"; character.transform.parent = null; clickScript.enabled = true; }