private async void OnPlayerSelected(object sender, DestinyPlayer player)
        {
            var data = await GetPlayerDataAsync(player);

            ActivityHistoryPane.PopulateActivityHistory(data);
            CharacterSwitcher.PopulateNameplates(data);
            SettingsDialog.PlayerData  = data;
            SearchPane.IsNarrowVisible = false;
        }
    void Start()
    {
        this.audioSource  = this.GetComponent <AudioSource>();
        this.switchScript = (CharacterSwitcher)FindObjectOfType(typeof(CharacterSwitcher));
        this.material     = gameObject.GetComponent <Renderer>().material;

        this.indicators         = new GameObject[] { GameObject.Find("IndicatorInf"), GameObject.Find("IndicatorChe"), GameObject.Find("IndicatorCiv") };
        this.isAbilityAvailable = new bool[] { true, true, true };

        StudentColorOverlay();
        explosionPos  = transform.position;
        explosionObj  = this.gameObject.transform.GetChild(3).gameObject;
        this.animator = explosionObj.gameObject.GetComponent <Animator>();
    }
示例#3
0
 // Use this for initialization
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     playableCharacters[0].GetComponent <CharacterBehaviour>().enabled = true;
     currentCharacter = playableCharacters[0];
     currentIndex     = 0;
     currentCharacter.GetComponent <CharacterBehaviour>().ShowArrow();
     for (int i = 1; i < playableCharacters.Length; i++)
     {
         playableCharacters[i].GetComponent <CharacterBehaviour>().enabled = false;
         playableCharacters[i].GetComponent <CharacterBehaviour>().HideArrow();
         playableCharacters[i].GetComponent <CharacterBehaviour>().BeInactive();
     }
 }
 void Start()
 {
     this.audioSource = gameObject.GetComponent <AudioSource>();
     charSwitchScript = (CharacterSwitcher)FindObjectOfType(typeof(CharacterSwitcher));
     m_rigidbody2D    = GetComponent <Rigidbody2D>();
 }