コード例 #1
0
 void OnEventRemoveInteractionHUD(InteractionHUD hud)
 {
     for (int i = 0; i < m_hudList.Count; ++i)
     {
         if (m_hudList[i] == hud)
         {
             Destroy(m_hudList[i].gameObject);
             m_hudList.RemoveAt(i);
             return;
         }
     }
 }
コード例 #2
0
        void OnEventCreateInteractionHUD(Character character, Transform hudPoint, Action <InteractionHUD> nortifyEvent)
        {
            if (IsAlreadyCreate(character))
            {
                return;
            }

            Action <InteractionHUD>[] arrEvent = new Action <InteractionHUD> [2];
            arrEvent[0] = nortifyEvent;
            arrEvent[1] = OnEventRemoveInteractionHUD;

            HUDInfo info = new HUDInfo();

            info.TargetCharacter = character;
            info.TargetHUDPoint  = hudPoint;

            GameObject     newObject = Instantiate(m_prefabHUD, transform);
            InteractionHUD hud       = newObject.GetComponent <InteractionHUD>();

            hud.Init(info, arrEvent);

            m_hudList.Add(hud);
        }
コード例 #3
0
        void OnEventInteraction(InteractionHUD interactionHUD)
        {
            StartCoroutine(CoroutineDialog());

            //GameEvent.instance.OnEventPlayDialog(this);
        }