Ejemplo n.º 1
0
 public override void Awake(GameObject go)
 {
     rectTransform = gameObject.GetComponent <RectTransform>();
     text          = gameObject.GetComponent <Text>();
     text.text     = "";
     CoroutineManager.DoCoroutine(PreHide());
 }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     if (Application.isPlaying)
     {
         CoroutineManager.DoCoroutine(_dragonAiCor);
         _isInit = true;
     }
 }
Ejemplo n.º 3
0
    // Use this for initialization

    void Start()
    {
        if (Application.isPlaying)
        {
            CoroutineManager.DoCoroutine(_actionChangeCoroutine);         //행동체인지 코루틴 시작
            CoroutineManager.DoCoroutine(_moveCoroutine);                 //이동 코루틴 시작
            startState  = MonsterStates.Stand;                            //처음 상태
            startAction = this.GetRandomMonsterAction <MonsterActions>(); //랜덤행동 가져오기
            setState(startState);                                         //상태 초기화
            setAction(startAction);                                       //행동 초기화
            _init = true;
        }
    }
Ejemplo n.º 4
0
    private void AddCompressListener(Button btn, int chapterIndex)
    {
        btn.onClick.RemoveAllListeners();
        UnityAction ua = delegate()
        {
            btn.enabled = false;
            m_mapItems[chapterIndex].Status = MapItemStatus.Collipsed;
            CoroutineManager.DoCoroutine(RemoveLevels(m_mapItems[chapterIndex].LevelCount, btn, chapterIndex));
        };

        btn.onClick.AddListener(ua);
        m_mapItems[chapterIndex].OnClickDelegate = ua;
    }
Ejemplo n.º 5
0
    public void GameUpdate()
    {
        if (Input.GetMouseButtonDown(0) && Model.Instance.currentState == Model.GameState.OnGoing)
        {
            var attachedMousePos = _attachedMousePos(Input.mousePosition);
            CoroutineManager.DoCoroutine(Model.Instance.DoMapCheck(attachedMousePos));
        }

        if (Input.GetKeyDown(KeyCode.R))
        {
            applicationIntegration.Restart();
        }
    }
Ejemplo n.º 6
0
    private static IEnumerator InitializeAsync()
    {
        yield return(CoroutineManager.DoCoroutine(LuaFacade.UpdateLocalScripts()));

        yield return(CoroutineManager.DoCoroutine(LuaFacade.UpdateLocalProtos()));

        LuaFacade.Initialize();
        AddressablesUpdater.RequestDownloadHandle = OnRequestDownload;
        AddressablesUpdater.OnDownload           += OnDownload;
        AddressablesUpdater.AfterDownloadHandle   = OnAfterDownload;
        AddressablesUpdater.OnCompleted          += OnCompleted;
        new GameObject("AddressablesUpdater").AddComponent <AddressablesUpdater>();
    }
    public override void Refresh()
    {
        if (null != BattleController.Instance.PlayerCurPokemonData)
        {
            image.sprite = Resources.Load <Sprite>("UIPrefab/BattleResult/win");
        }
        else
        {
            image.sprite = Resources.Load <Sprite>("UIPrefab/BattleResult/faill");
        }

        CoroutineManager.DoCoroutine(PreHide());
    }
Ejemplo n.º 8
0
 public override void Active()
 {
     if (isInit)
     {
         rectTransform.DOScale(1, 0.2f);
         CoroutineManager.DoCoroutine(PreHide());
     }
     else
     {
         isInit = true;
         Hide();
     }
 }
Ejemplo n.º 9
0
    public override bool Run()
    {
        float preTime   = BlackBoard.Instance.GetGroundTime().PreOverLapTime;
        float afterTime = BlackBoard.Instance.GetGroundTime().AfterOverLapTime;

        bool IsGroundAct = BlackBoard.Instance.IsGroundPatternAct;

        if (!IsGroundAct)
        {
            CoroutineManager.DoCoroutine(DragonOverLapStrat(preTime, afterTime));
        }

        return(false);
    }
Ejemplo n.º 10
0
    public override bool Run()
    {
        bool IsTakeOffAct = BlackBoard.Instance.IsTakeOffAct;

        if (!IsTakeOffAct)
        {
            float RunTime = 10.0f;
            BlackBoard.Instance.IsTakeOffAct = true;
            CoroutineManager.DoCoroutine(TakeOffAction(RunTime));
        }
        Debug.Log("TakeOff_Action");

        return(false);
    }
Ejemplo n.º 11
0
    public override bool Run()
    {
        bool IsLeftPowAttack = BlackBoard.Instance.IsLeftPowAttack;

        if (!IsLeftPowAttack)
        {
            float preTime   = BlackBoard.Instance.GetGroundTime().PreEnsuingAttackTime;
            float afterTime = BlackBoard.Instance.GetGroundTime().AfterEnsuingAttackTime;

            CoroutineManager.DoCoroutine(LeftPowAttack(preTime, afterTime));
        }

        return(false);
    }
    public override bool Run()
    {
        bool IsHoveringAct = BlackBoard.Instance.IsHoveringPatternAct;

        float preTime   = BlackBoard.Instance.GetFlyingTime().PreMissileTime;
        float afterTime = BlackBoard.Instance.GetFlyingTime().AfterMissileTime;

        if (!IsHoveringAct)
        {
            CoroutineManager.DoCoroutine(HomingBulletShot(preTime, afterTime));
        }

        Debug.Log("HomingBulletShot_Pattern");

        return(false);
    }
Ejemplo n.º 13
0
    public override bool Run()
    {
        bool HoveringAct = BlackBoard.Instance.IsHoveringPatternAct;

        float preTime   = BlackBoard.Instance.GetFlyingTime().PreBreathTime;
        float afterTime = BlackBoard.Instance.GetFlyingTime().AfterBreathTime;

        if (!HoveringAct)
        {
            CoroutineManager.DoCoroutine(BreathShot(preTime, afterTime));
        }

        Debug.Log("Berath_Pattern");

        return(false);
    }
    public override bool Run()
    {
        Transform Player = DragonManager.Instance.Player;
        Transform Dragon = DragonManager.Instance.transform;

        bool IsFlying           = BlackBoard.Instance.IsFlying;
        bool IsFlyingPatternAct = BlackBoard.Instance.IsFlyingPatternAct;

        int MaxCrystal = BlackBoard.Instance.MaxIceBulletCrystalNum;
        int MinCrystal = BlackBoard.Instance.MinIceBulletCrtystalNum;
        int CurCrystal = BlackBoard.Instance.CurIceCrystalNum;

        float preTime   = BlackBoard.Instance.GetFlyingTime().PreIceBulletTime;
        float afterTime = BlackBoard.Instance.GetFlyingTime().AfterIceBulletIime;


        if (IsFlying &&
            MaxCrystal >= CurCrystal &&
            CurCrystal > MinCrystal)
        {
            Vector3 forward = (Player.position - Dragon.position).normalized;

            Dragon.rotation =
                Quaternion.RotateTowards(
                    Dragon.rotation,
                    Quaternion.LookRotation(forward),
                    90.0f * Time.deltaTime
                    );

            if (!IsFlyingPatternAct)
            {
                CoroutineManager.DoCoroutine(IceBulletCor(preTime, afterTime));
            }
            return(false);
        }
        return(true);
    }
 protected override void Execute(List <GameEntity> entities)
 {
     CoroutineManager.DoCoroutine(PreEndBattle());
 }
Ejemplo n.º 16
0
 public override void Active()
 {
     rectTransform.DOAnchorPosY(80, 0.1f);
     CoroutineManager.DoCoroutine(PreHide());
 }
Ejemplo n.º 17
0
 private static void Initialize()
 {
     CoroutineManager.DoCoroutine(InitializeAsync());
 }
Ejemplo n.º 18
0
    private static IEnumerator OnAfterDownload()
    {
        yield return(CoroutineManager.DoCoroutine(LuaFacade.UpdateLocalScripts(true)));

        yield return(CoroutineManager.DoCoroutine(LuaFacade.UpdateLocalProtos(true)));
    }