Esempio n. 1
0
    private void Awake()
    {
        ingameManager      = GameObject.FindGameObjectWithTag("InGameManager").GetComponent <InGameManager>();
        mesh               = GetComponentInChildren <SkinnedMeshRenderer>();
        fog                = GetComponent <FogOfWarEntity>();
        minHP              = transform.GetComponent <MinionHP>();
        TheAIDest          = gameObject.GetComponent <AIDestinationSetter>();
        minAtk             = transform.GetComponentInChildren <MinionAtk>();
        Audio              = GetComponentInChildren <AudioSource>();
        Audio.minDistance  = 1.0f;
        Audio.maxDistance  = 10.0f;
        Audio.volume       = 1f;
        Audio.spatialBlend = 0.5f;
        Audio.rolloffMode  = AudioRolloffMode.Linear;
        if (minAtk == null)
        {
            print("minatk is null");
        }
        TheAIPath = gameObject.GetComponent <AIPath>();

        if (!cursor)
        {
            cursor = GameObject.FindGameObjectWithTag("MouseCursor").GetComponent <AOSMouseCursor>();
        }
    }
Esempio n. 2
0
    private void OnEnable()
    {
        if (!isNexus)
        {
            int num = (myNext.nexusAtkNum % 10);
            if (num > 0)
            {
                if (num == 1)
                {
                    if (myNextTower1.gameObject.activeInHierarchy)
                    {
                        myNextTower1.isCanAtkMe = false;
                    }
                    if (myNextTower2.gameObject.activeInHierarchy)
                    {
                        myNextTower2.isCanAtkMe = false;
                    }
                }
                myNext.nexusAtkNum -= 1;
            }
        }
        towerstat.Hp = towerstat.MaxHp;
        HP           = towerstat.Hp;
        isDead       = false;

        if (!cursor)
        {
            cursor = GameObject.FindGameObjectWithTag("MouseCursor").GetComponent <AOSMouseCursor>();
        }
    }
Esempio n. 3
0
    private void OnEnable()
    {
        isDead = false;

        // 처음 생성된 경우 사이즈에 맞는 HP 바를 붙여준다.
        if (isFirstload)
        {
            if (bigJungleHP != null)
            {
                bigJungleHP.BasicSetting();
            }

            if (smallJungleHP != null)
            {
                smallJungleHP.BasicSetting();
            }

            isDead = true;
        }

        if (!cursor)
        {
            cursor = GameObject.FindGameObjectWithTag("MouseCursor").GetComponent <AOSMouseCursor>();
        }
    }
Esempio n. 4
0
 void Start()
 {
     optionCanvas = GameObject.FindGameObjectWithTag("OptionCanvas");
     uiCanvas     = GameObject.FindGameObjectWithTag("UICanvas");
     if (!cursor)
     {
         cursor = GameObject.FindGameObjectWithTag("MouseCursor").GetComponent <AOSMouseCursor>();
     }
 }
Esempio n. 5
0
 private void OnLevelWasLoaded(int level)
 {
     if (UnityEngine.SceneManagement.SceneManager.GetSceneByBuildIndex(level).name.Equals("InGame"))
     {
         if (!cursor)
         {
             cursor = GameObject.FindGameObjectWithTag("MouseCursor").GetComponent <AOSMouseCursor>();
         }
         Invoke("HPSet", 0.5f);
     }
 }
Esempio n. 6
0
 private void OnEnable()
 {
     if (firstload)
     {
         towerHP.BasicSetting();
     }
     firstload  = true;
     myTowerAtk = transform.GetComponentInChildren <TowerAtk>();
     if (!cursor)
     {
         cursor = GameObject.FindGameObjectWithTag("MouseCursor").GetComponent <AOSMouseCursor>();
     }
 }
Esempio n. 7
0
    private void OnLevelWasLoaded(int level)
    {
        if (SceneManager.GetSceneByBuildIndex(level).name.Equals("InGame"))
        {
            PhotonNetwork.OnEventCall += SpellEffectSync;

            cursor         = GameObject.FindGameObjectWithTag("MouseCursor").GetComponent <AOSMouseCursor>();
            Ping           = GameObject.FindGameObjectWithTag("PingPool").GetComponent <PingPooling>();
            cam            = Camera.main.GetComponent <RTS_Cam.RTS_Camera>();
            minimap        = GameObject.FindGameObjectWithTag("MinimapClick").GetComponent <MinimapClick>();
            chat           = GameObject.FindGameObjectWithTag("ChatManager").GetComponentInChildren <ChatFunction>();
            SpellContainer = GameObject.FindGameObjectWithTag("SpellPooling");
            makepool();
            isInGameScene = true;
        }
    }
Esempio n. 8
0
    /// <summary>
    /// 해당 스크립트의 전체적인 기본 값을 설정하는 함수
    /// </summary>
    private void Init()
    {
        ingameManager = GameObject.FindGameObjectWithTag("InGameManager").GetComponent <InGameManager>();
        mesh          = GetComponentInChildren <SkinnedMeshRenderer>();
        fog           = GetComponent <FogOfWarEntity>();
        minHP         = transform.GetComponent <MinionHP>();
        minAtk        = transform.GetComponentInChildren <MinionAtk>();
        TheAIDest     = gameObject.GetComponent <AIDestinationSetter>();
        TheAIPath     = gameObject.GetComponent <AIPath>();

        if (!cursor)
        {
            cursor = GameObject.FindGameObjectWithTag("MouseCursor").GetComponent <AOSMouseCursor>();
        }

        InitAudio();
    }