예제 #1
0
    public static void UpdateAssignedManeuverDial(GenericShip ship, Movement.GenericMovement maneuver)
    {
        if (maneuver == null)
        {
            return;
        }

        GameObject maneuverDial = ship.InfoPanel.transform.Find("AssignedManeuverDial").gameObject;
        Image      dialImage    = maneuverDial.transform.Find("Holder").GetComponent <Image>();

        dialImage.sprite = Resources.Load <Sprite>("Sprites/Dials/" + Editions.Edition.Current.NameShort + "/Flipped");

        Text maneuverSpeed = maneuverDial.transform.Find("Holder").Find("ManeuverSpeed").GetComponent <Text>();

        maneuverSpeed.text  = maneuver.Speed.ToString();
        maneuverSpeed.color = maneuver.GetColor();
        maneuverSpeed.gameObject.SetActive(ship.Owner.IsNeedToShowManeuver(ship));

        Text maneuverBearing = maneuverDial.transform.Find("Holder").Find("ManeuverBearing").GetComponent <Text>();

        maneuverBearing.text  = maneuver.GetBearingChar();
        maneuverBearing.color = maneuver.GetColor();
        maneuverBearing.gameObject.SetActive(ship.Owner.IsNeedToShowManeuver(ship));

        maneuverDial.SetActive(true);
    }
예제 #2
0
    public static void UpdateAssignedManeuverDial(GenericShip ship, Movement.GenericMovement maneuver)
    {
        GameObject maneuverDial = ship.InfoPanel.transform.Find("AssignedManeuverDial").gameObject;

        Text maneuverSpeed = maneuverDial.transform.Find("Holder").Find("ManeuverSpeed").GetComponent <Text>();

        maneuverSpeed.text  = maneuver.Speed.ToString();
        maneuverSpeed.color = maneuver.GetColor();
        maneuverSpeed.gameObject.SetActive(ship.Owner.IsNeedToShowManeuver(ship));

        Text maneuverBearing = maneuverDial.transform.Find("Holder").Find("ManeuverBearing").GetComponent <Text>();

        maneuverBearing.text  = maneuver.GetBearingChar();
        maneuverBearing.color = maneuver.GetColor();
        maneuverBearing.gameObject.SetActive(ship.Owner.IsNeedToShowManeuver(ship));

        maneuverDial.SetActive(true);
    }