Ejemplo n.º 1
0
    private void OnEnable()
    {
        audio               = GetComponent <AudioSource>();
        fog                 = GetComponent <FogOfWarEntity>();
        mesh                = GetComponent <SkinnedMeshRenderer>();
        myChampionData      = GetComponent <ChampionData>();
        myChampionAnimation = GetComponent <ChampionAnimation>();
        ChampHP             = transform.GetComponent <ChampionHP>();
        icon                = transform.parent.GetComponentInChildren <ChampionIcon>().gameObject;
        rigidbody           = GetComponent <Rigidbody>();
        myPhotonView        = GetComponent <PhotonView>();
        if (myPhotonView.owner.GetTeam().ToString().Equals("blue"))
        {
            Team = "Blue";
        }
        if (photonView.owner.Equals(PhotonNetwork.player) && SceneManager.GetActiveScene().name.Equals("Selection"))
        {
            ChampionSound.instance.SelectionVoice(PlayerData.Instance.championName);
        }

        if (!myPhotonView.isMine) // 사운드
        {
            audio.volume       = 0.5f;
            audio.loop         = false;
            audio.spatialBlend = 1f;
            audio.rolloffMode  = AudioRolloffMode.Linear;
            audio.maxDistance  = 20f;
        }
    }
Ejemplo n.º 2
0
    /// <summary>
    /// 챔피언에게 체력바를 붙이는 함수
    /// </summary>
    private void SetHP()
    {
        champHP = transform.GetComponent <ChampionHP>();

        if (champHP == null)
        {
            isHpinit = true;
        }
    }
Ejemplo n.º 3
0
    private void HPSet()
    {
        ChampHP = transform.GetComponent <ChampionHP>();

        if (ChampHP == null)
        {
            //ChampHP.BasicSetting();
            hpinit = true;
        }
    }