void Awake()
    {
        pGoodGuysContainer = GameObject.Find("GoodGuys").GetComponent<CharactersControl>();
        pPlayer = pGoodGuysContainer.gameObject.transform.GetChild(m_iPlayerNum).gameObject.GetComponentInChildren<Player>();

        EventTrigger.Entry tEntry = new EventTrigger.Entry();
        tEntry.eventID = EventTriggerType.PointerUp;
        tEntry.callback.AddListener(delegate { pGoodGuysContainer.SelectCharacter(pPlayer); });
        gameObject.GetComponent<EventTrigger>().triggers.Add(tEntry);
    }
Beispiel #2
0
    void Awake()
    {
        pGoodGuysContainer = GameObject.Find("GoodGuys").GetComponent <CharactersControl>();
        pPlayer            = pGoodGuysContainer.gameObject.transform.GetChild(m_iPlayerNum).gameObject.GetComponentInChildren <Player>();

        EventTrigger.Entry tEntry = new EventTrigger.Entry();
        tEntry.eventID = EventTriggerType.PointerUp;
        tEntry.callback.AddListener(delegate { pGoodGuysContainer.SelectCharacter(pPlayer); });
        gameObject.GetComponent <EventTrigger>().triggers.Add(tEntry);
    }
Beispiel #3
0
 public void MouseClick()
 {
     for (int i = 0; i < m_pIsSelected.Length; i++)
     {
         if (!CharactersControl.PlayerCharacters[i].IsDead)
         {
             pCharactersControl.SelectCharacter(i);
             m_pIsSelected[i] = true;
         }
     }
 }