public static void CreateNavigationArrow(string actiongroup, ArrowTypeEnum type) { foreach (GameObject ship in Mission.MissionRes.enemis) { if (!ship) { continue; } if (ship.GetComponent <Ship>().actiongroup == actiongroup) { ship.gameObject.GetComponent <AIship>().CreateArrow(type); } } }
public void CreateArrow(GameObject player, GameObject target, ArrowTypeEnum type) { GameObject _arrow = Instantiate(arrow).gameObject; _arrow.GetComponent <NavigationArrow>().player = playership.transform; _arrow.GetComponent <NavigationArrow>().target = target.transform; _arrow.transform.SetParent(this.transform); _arrow.transform.localPosition = Vector3.zero; _arrow.transform.localScale = Vector3.one; if (type == ArrowTypeEnum.Enemy) { _arrow.GetComponent <Image>().color = Color.red; } if (type == ArrowTypeEnum.Ally) { _arrow.GetComponent <Image>().color = Color.blue; } if (type == ArrowTypeEnum.Event) { _arrow.GetComponent <Image>().color = Color.yellow; } }
public void CreateUiArrow(GameObject target, ArrowTypeEnum type) { spaceUI.CreateArrow(playershiptransform.gameObject, target, type); }
public void CreateArrow(ArrowTypeEnum type) { sceneres.CreateUiArrow(this.gameObject, type); }
public static void CreateNavigationArrowToObj(string objectname, ArrowTypeEnum type) { UI.CreateArrow(playership.gameObject, GameObject.Find(objectname), type); }