// Use this for initialization
    void Start()
    {
        m_rigidbody       = this.GetComponent <Rigidbody>();
        m_playerTransform = CharactersConfigManager.GetPlayerGameObject().transform;
        m_state           = Boss1States.IDLE;
        m_animator        = GetComponent <Animator>();

        m_idlePosition = idlePosition.transform.position;
        //this.transform.position = m_idlePosition;
        m_targetPosition     = m_idlePosition;
        m_rigidbody.velocity = new Vector3(0, 0, 0);

        m_nextSkill = RandomSkillRoller();

        hp = maxHP;
        m_isAttackMeleeLocked  = false;
        m_isAttackFireLocked   = false;
        m_isAttackAOELocked    = false;
        m_isPlayerInAlertRange = false;


        m_isPlayerInAOERange   = false;
        m_isPlayerInFireRange  = false;
        m_isPlayerInMeleeRange = false;

        rushTimer      = 0;
        fireChaseTimer = 0;
        idleTimer      = 0;

        m_FireEffect = null;
    }
Esempio n. 2
0
    private void ResetGameElements()
    {
        ProCamera2D.Instance.Reset();

        PlayerTestController.instance.Restart();
        CharactersConfigManager.GetPlayerGameObject().transform.position = GameRunTimeStatus.RebornPlace;
    }
Esempio n. 3
0
 private void ResetGameElements()
 {
     ProCamera2D.Instance.Reset();
     boss.Find("boss01Anime01").GetComponent <Rigidbody>().position = bossBornPlace.position;
     boss.Find("boss01Anime01").GetComponent <Boss1ChaseController>().Initializations();
     PlayerTestController.instance.Restart();
     CharactersConfigManager.GetPlayerGameObject().transform.position = GameRunTimeStatus.RebornPlace;
 }
Esempio n. 4
0
    void OnTriggerEnter(Collider collider)
    {
        if (collider.tag == "Player")
        {
            nextDialog = true;
            if (!canMoveHere)
            {
                string playerPath = CharactersConfigManager.GetCharacterGameObjectPath(CharactersConfigManager.k_PlayerID);

                List <int> blockstate = new List <int>();
                blockstate.Add(0);
                GameObject.Find(playerPath).GetComponent <PlayerTestController>().BlockPlayerInput(blockstate);
            }
        }
    }
Esempio n. 5
0
    // Use this for initialization
    void Start()
    {
        middleGround = GameObject.Find("Level/middleGround");

        InitPostProcessingColor();

        playerTransform = CharactersConfigManager.GetPlayerGameObject().transform;

        Camera.main.GetComponent <Painting>().enabled = false;
        PlayerStatus.IsDrawing = false;

        ///initialIsActive = new bool[ToHide.Length];

        alphaDissolve = Resources.Load("Materials/AlphaDissolve") as Material;
        spriteDiffuse = Resources.Load("Materials/SpriteDiffuse") as Material;
    }
    // Use this for initialization
    void Start()
    {
        m_rigidbody       = this.GetComponent <Rigidbody>();
        m_alertCollider   = alertRange.GetComponent <BoxCollider>();
        m_playerTransform = CharactersConfigManager.GetPlayerGameObject().transform;
        m_animator        = GetComponent <Animator>();

        m_state           = MonsterStates.IDLE;
        m_isInCombatRange = true;

        m_isAttackLocked = false;

        this.transform.position = startPosition.transform.position;
        m_targetPosition        = endPosition.transform.position;
        m_rigidbody.velocity    = new Vector3(speed, 0, 0);

        repellT = 0;
    }
 // Use this for initialization
 void Start()
 {
     m_hp = maxHP;
     m_attackCDTimeCounter = attackCDTime;
     m_playerTransform     = CharactersConfigManager.GetPlayerGameObject().transform;
 }
Esempio n. 8
0
 void Start()
 {
     m_boss1AIController = monster.GetComponent <Boss1AIController>();
     m_playerTransform   = CharactersConfigManager.GetPlayerGameObject().transform;
 }
Esempio n. 9
0
 // Use this for initialization
 void Start()
 {
     InitFireBall();
     fireBall.SetActive(false);
     m_playerTransform = CharactersConfigManager.GetPlayerGameObject().transform;
 }
Esempio n. 10
0
    // Update is called once per frame
    void Update()
    {
        if (bubble && curSpeakingTransform)
        {
            //float yOffset = curSpeakingTransform.gameObject.GetComponent<Renderer>().bounds.size.y;

            bubble.transform.position = Camera.main.WorldToScreenPoint(curSpeakingTransform.position + new Vector3(0, 0, 0));
        }


        if (canInput && (Input.GetKey(KeyCode.F5) || Input.GetMouseButtonDown(0)))
        {
            nextDialog = true;
        }

        if (nextDialog)
        {
            string playerPath = CharactersConfigManager.GetCharacterGameObjectPath(CharactersConfigManager.k_PlayerID);
            // if (!canMoveHere)
            // {
            //     List<int> blockstate = new List<int>();
            //     blockstate.Add(0);
            //     GameObject.Find(playerPath).GetComponent<PlayerTestController>().BlockPlayerInput(blockstate);
            // }

            nextDialog = false;
            if (index == dialogList.Count)
            {
                Debug.Log("dialog ends");
                canInput = false;
                if (bubble)
                {
                    Destroy(bubble);
                }
                if (!canMoveHere)
                {
                    Debug.Log("%%%%%%%%%%%%%%%restore");
                    List <int> blockstate = new List <int>();
                    blockstate.Add(0);
                    GameObject.Find(playerPath).GetComponent <PlayerTestController>().UnblockPlayerInput(blockstate);
                }
                landBreak.cs.doShake = true;
                landBreak.startTime  = Time.time;
                return;
            }


            DialogStruct dialog = dialogList[index];

            if (dialog.speakerID != curSpeakerId) // new speaker
            {
                if (bubble)
                {
                    Destroy(bubble);
                }
                Debug.Log(dialog.speakerID);
                curSpeakerId = dialog.speakerID;

                bubble = Instantiate(Resources.Load("Prefabs/DialogBubble")) as GameObject;
                Debug.Log(bubble);
                bubble.transform.SetParent(GameObject.Find("Canvas").transform);
                //curBubbleTransform = bubble.transform;
                string objectName = CharactersConfigManager.GetCharacterGameObjectPath(dialog.speakerID);

                curSpeakingTransform = GameObject.Find(objectName).transform;

                bubble.GetComponent <BubbleEffectController>().setSaySomething(dialog.content);

                string speakerName = CharactersConfigManager.GetCharacterName(dialog.speakerID);
                bubble.GetComponent <BubbleEffectController>().setName(speakerName);

                string spritePath = CharactersConfigManager.GetCharacterSpritePath(dialog.speakerID);
                bubble.GetComponent <BubbleEffectController>().setHead(spritePath);


                canInput = false;
                Invoke("EnableInput", 0.5f);


                curSpeakerId = dialog.speakerID;
            }
            else
            {
                bubble.GetComponent <BubbleEffectController>().setSaySomething(dialog.content);
                canInput = false;
                Invoke("EnableInput", 0.5f);
            }
            index++;
        }
    }