コード例 #1
0
 /// <summary>
 ///
 /// </summary>
 protected override void Awake()
 {
     base.Awake();
     m_Transform = transform;
     bl_PhotonCallbacks.PlayerEnteredRoom += OnPhotonPlayerConnected;
     bl_AIMananger.OnBotStatUpdate        += OnBotStatUpdate;
     Agent                 = this.GetComponent <NavMeshAgent>();
     AIAnim                = GetComponentInChildren <bl_AIAnimation>();
     AIHealth              = GetComponent <bl_AIShooterHealth>();
     AIWeapon              = GetComponent <bl_AIShooterWeapon>();
     defaultSpeed          = Agent.speed;
     Anim                  = GetComponentInChildren <Animator>();
     ObstacleBetweenTarget = false;
     CoverManager          = FindObjectOfType <bl_AICovertPointManager>();
     AIManager             = CoverManager.GetComponent <bl_AIMananger>();
     TimeManager           = FindObjectOfType <bl_RoundTime>();
     DrawName              = GetComponent <bl_DrawName>();
     m_GameMode            = GetGameMode;
 }
コード例 #2
0
    /// <summary>
    ///
    /// </summary>
    void OnEnable()
    {
        RoomMenu  = FindObjectOfType <bl_RoomMenu>();
        AIManager = FindObjectOfType <bl_AIMananger>();
#if LOCALIZATION
        LocaleStrings = bl_Localization.Instance.GetTextArray(LocaleTextIDs);
#endif
        InvokeRepeating("UpdateScoreboard", 1, 1);
        SetUpUI();
        if (MaxRoomPing > 0)
        {
            InvokeRepeating("CheckPing", 5, 5);
        }
        bl_EventHandler.OnLocalPlayerSpawn += OnPlayerSpawn;
        bl_EventHandler.OnPickUp           += OnPicUpMedKit;
        bl_EventHandler.OnLocalPlayerDeath += OnLocalPlayerDeath;
        bl_EventHandler.OnRoundEnd         += OnRoundFinish;
        bl_PhotonCallbacks.LeftRoom        += OnLeftRoom;
    }
コード例 #3
0
    /// <summary>
    ///
    /// </summary>
    protected override void Awake()
    {
        base.Awake();
        if (!PhotonNetwork.IsConnected || !PhotonNetwork.InRoom)
        {
            return;
        }

        RoomMenu     = base.GetComponent <bl_RoomMenu>();
        TimeManager  = base.GetComponent <bl_RoundTime>();
        AIMananger   = FindObjectOfType <bl_AIMananger>();
        UIReferences = bl_UIReferences.Instance;
        GameData     = bl_GameData.Instance;
#if BDGM
        BombDefuse = FindObjectOfType <bl_BombDefuse>();
#endif
#if CP
        CoverPoint = FindObjectOfType <bl_CoverPointRoom>();
#endif
        ResetRoom();
        GetRoomInfo();
    }
コード例 #4
0
 /// <summary>
 ///
 /// </summary>
 void Awake()
 {
     Agent     = GetComponent <bl_AIShooterAgent>();
     AIManager = FindObjectOfType <bl_AIMananger>();
     AIAnim    = GetComponentInChildren <bl_AIAnimation>();
 }