コード例 #1
0
    void Update() //Every frame... I think we can clear this entirely up if we search enough in the code. TODO: make it empty.
    {
        cmui    = GameObject.Find("Crew Members bg").GetComponent <CrewMemberUI>();
        cs      = GameObject.Find("Crew Member").GetComponent <CrewSlot>();
        pr      = GameObject.Find("Pilot Reader").GetComponent <PilotReader>();
        jmp     = GameObject.Find("WriteJump").GetComponent <Text>();
        spd     = GameObject.Find("WriteSpeed").GetComponent <Text>();
        tmr     = GameObject.Find("WriteTimer").GetComponent <Text>();
        nameone = GameObject.Find("SHIPNAME").GetComponent <Text>();
        crew1   = GameObject.Find("Crew2Text").GetComponent <Text>();
        crew2   = GameObject.Find("Crew1Text").GetComponent <Text>();

        if (!inGame)
        {
            jmp.text     = jump + "";
            spd.text     = speed + "";
            tmr.text     = timer + "";
            nameone.text = name1;
        }

        // The following text is the add. of crew members stats. The third is available if we want to expand the crew.
        jump  = Pj + c1j + c2j /*+ c3j*/;
        speed = Ps + c1s + c2s /*+ c3s*/;
        timer = Pt + c1t + c2t /*+ c3t*/;
    }
コード例 #2
0
 // Start is called before the first frame update
 void Start()
 {
     cmui = GameObject.Find("Crew Members bg").GetComponent <CrewMemberUI>();
     c    = GameObject.Find("crew").GetComponent <Crew>();
     Slot = this.gameObject;
     CrewManager();
     namedude.text = crewdesc;// GetComponent<Text>();
     Debug.Log(crewdesc);
     // namedude.text = crewdesc;
 }
コード例 #3
0
 /// <summary>
 /// Store a reference to the CrewMemberUI for the CrewMember currently attached to this PositionUI's Position
 /// </summary>
 public void LinkCrew(CrewMemberUI crewMember)
 {
     if (crewMember != CrewMemberUI)
     {
         if (CrewMemberUI != null)
         {
             CrewMemberUI.OnReset();
         }
         RemoveCrew();
         CrewMemberUI = crewMember;
         UIManagement.TeamSelection.PositionChange();
     }
     UIManagement.Tutorial.ShareEvent(GetType().Name, MethodBase.GetCurrentMethod().Name, Position.ToString(), crewMember);
 }
コード例 #4
0
 // Update is called once per frame
 void Awake()
 {
     jmp     = GameObject.Find("WriteJump").GetComponent <Text>();
     spd     = GameObject.Find("WriteSpeed").GetComponent <Text>();
     tmr     = GameObject.Find("WriteTimer").GetComponent <Text>();
     nameone = GameObject.Find("SHIPNAME").GetComponent <Text>();
     crew1   = GameObject.Find("Crew2Text").GetComponent <Text>();
     crew2   = GameObject.Find("Crew1Text").GetComponent <Text>();
     cmui    = GameObject.Find("Crew Members bg").GetComponent <CrewMemberUI>();
     cs      = GameObject.Find("Crew Member").GetComponent <CrewSlot>();
     pr      = GameObject.Find("Pilot Reader").GetComponent <PilotReader>();
     if (instance != null && instance != this)
     {
         Destroy(this.gameObject);
         return;
     }
     else
     {
         instance = this;
     }
     DontDestroyOnLoad(this.gameObject);
 }