示例#1
0
    // IDK in case we need some default thing if we add more phases??
    // Aint gotta be filled in.
    static public void DefaultBossTransision()
    {
        //////////////////////
        // All Example Shit //
        //////////////////////

        // Set the positions of the characters for this transition.
        //EntityStats.Instance.GetObjectOfEntity("Player").transform.position = . . .
        //EntityStats.Instance.GetObjectOfEntity("Boss").transform.position = . . .

        // Disable the player camera and enable the cinematic camera.
        //playerCam.gameObject.SetActive(false);
        //cinematicCam.gameObject.SetActive(true);

        // Do other cinematic camera functionality to get it ready.
        //cinematicCam.transform.postion = . . .
        //cinematicCam.transform.LookAt(cameraLockOnPoint);

        // Begin animations of the characters
        //EntityStats.Instance.GetObjectOfEntity("Player").GetComponent<Animator>().SetInteger("SomeAnimPara/PhaseOne", 0);
        //EntityStats.Instance.GetObjectOfEntity("Boss").GetComponent<Animator>().SetInteger("SomeAnimPara/PhaseOne", 0);
        //EntityStats.Instance.RestoreAllStats();
        BossBrain bossbrain = EntityStats.Instance.GetObjectOfEntity("Boss").GetComponent <BossBrain>();

        EntityStats.Instance.SetMaxHealthOfEntity("Boss", bossbrain.m_bossPhaseList[bossbrain.m_currentPhase + 1].m_healthAtStart);
        EntityStats.Instance.RestoreAllStatsInstant();
    }
示例#2
0
    public void DeactivateHitBox(int a_colliderNumber)
    {
        GameObject boss  = EntityStats.Instance.GetObjectOfEntity("Boss");
        BossBrain  brain = boss.GetComponent <BossBrain>();

        boss.GetComponent <BossVariables>().m_weaponColliders[a_colliderNumber].enabled = false;
    }
示例#3
0
    void Start()
    {
        instance         = this;
        basicAttack      = GetComponent <BossMovement>();
        bossAbility      = GetComponent <BossAbility>();
        bossDefense      = GetComponent <BossDefense>();
        bossResources    = GetComponentInParent <ResourceManager>();
        bossAgent        = GetComponent <NavMeshAgent>();
        disablingScripts = false;
        bossAnim         = GetComponent <Animator>();

        p_MaxHp       = 100;
        p_CurrentHP   = p_MaxHp;
        _pHealth.text = "p_Health: " + p_CurrentHP;
        p_EstimateHP  = 0;
        playerIsAlive = true;

        cdOne                 = 0;
        cdTwo                 = 0;
        cdThree               = 0;
        primaryUpgradeCount   = 0;
        defensiveUpgradeCount = 0;
        choice                = 0;

        attackDetected = false;
        this.enabled   = false;
    }
示例#4
0
    static public void PhaseTwoTransition()
    {
        //    Debug.Log("PhaseTwoX");
        //    ////////////////////
        //    All Example Shit //
        //                     ////////////////////

        //    Set the positions of the characters for this transition.
        //   EntityStats.Instance.GetObjectOfEntity("Player").transform.position = . . .
        //   EntityStats.Instance.GetObjectOfEntity("Boss").transform.position = . . .


        //    Disable the player camera and enable the cinematic camera.
        //   playerCam.gameObject.SetActive(false);
        //   cinematicCam.gameObject.SetActive(true);

        //    Do other cinematic camera functionality to get it ready.
        //   cinematicCam.transform.postion = . . .
        //   cinematicCam.transform.LookAt(cameraLockOnPoint);

        BossBrain bossbrain = EntityStats.Instance.GetObjectOfEntity("Boss").GetComponent <BossBrain>();

        EntityStats.Instance.SetMaxHealthOfEntity("Boss", bossbrain.m_bossPhaseList[bossbrain.m_currentPhase + 1].m_healthAtStart);
        Camera.main.GetComponentInChildren <BossMusicScript>().IncrementBossPhase();
        EntityStats.Instance.RestoreAllStatsInstant();
    }
示例#5
0
 void Start()
 {
     bossBrain     = GetComponentInChildren <BossBrain>();
     startPosition = transform.position;
     startRotation = transform.rotation;
     myResources   = GetComponent <ResourceManager>();
     //bossAnim.GetComponentInChildren<Animator>();
 }
示例#6
0
    static public void PhaseFourTransition()
    {
        BossBrain bossbrain = EntityStats.Instance.GetObjectOfEntity("Boss").GetComponent <BossBrain>();

        EntityStats.Instance.SetMaxHealthOfEntity("Boss", bossbrain.m_bossPhaseList[bossbrain.m_currentPhase + 1].m_healthAtStart);
        Camera.main.GetComponentInChildren <BossMusicScript>().IncrementBossPhase();
        EntityStats.Instance.RestoreAllStatsInstant();
    }
示例#7
0
 // Use this for initialization
 void Start()
 {
     direction    = -1;
     currentState = States.STAY;
     bossBrain    = GetComponent <BossBrain>();
     animator     = GetComponent <Animator>();
     sprite       = GetComponent <SpriteRenderer>();
     battleOn     = false;
 }
示例#8
0
    public void ActivateHitBox(int a_colliderNumber)
    {
        GameObject boss  = EntityStats.Instance.GetObjectOfEntity("Boss");
        BossBrain  brain = boss.GetComponent <BossBrain>();

        // Need to get correct colider from attack stored within boss.
        // int colliderToModify = (int)brain.m_currentAttackVariables.m_colliderToActivate[brain.m_currentAttackVariables.m_attackInChain];

        boss.GetComponent <BossVariables>().m_weaponColliders[a_colliderNumber].enabled = true;
    }
示例#9
0
    static public void BossDefeatedTransition()
    {
        Debug.Log("Ripperino in pelagrino.");
        BossBrain bossbrain = EntityStats.Instance.GetObjectOfEntity("Boss").GetComponent <BossBrain>();

        Camera.main.GetComponentInChildren <BossMusicScript>().IncrementBossPhase();


        bossbrain.enabled = false;
        EntityStats.Instance.GetObjectOfEntity("Boss").GetComponent <Animator>().SetInteger("Death", 1);
    }
示例#10
0
    public static void Open(BossBrain _dataObject)
    {
        script = _dataObject;
        BossBrainEditorWindow window  = CreateInstance <BossBrainEditorWindow>();
        Texture    windowIcon         = AssetDatabase.LoadAssetAtPath <Texture>("Assets/Prototyping/EricsFun/Objects/BossEntity/Editor/bwain.png");
        GUIContent windowTitleContent = new GUIContent("Boss Brain Editor", windowIcon);

        window.titleContent     = windowTitleContent;
        window.serializedObject = new SerializedObject(_dataObject);
        window.Show();
    }
示例#11
0
        public override void OnLoad()
        {
            base.OnLoad();

            var brain = new BossBrain(this);

            brain.Abilities = CreatureService.BossSpawnAbilities.Where(x => x.BossSpawnId == this.BossId).ToList();
            AiInterface.SetBrain(brain);

            //AiInterface.SetBrain(new BossBrain(this));
        }
示例#12
0
 // Use this for initialization
 void Start()
 {
     bossRigidBody = GetComponent <Rigidbody2D>();
     bossBrain     = GetComponent <BossBrain>();
     heroCollider  = GetComponent <BoxCollider2D>();
     animator      = GetComponent <Animator>();
     gameManager   = GameObject.Find("GameManager").GetComponent <GameManager>();
     swordHBRight  = transform.Find("swordHBRight").gameObject;
     swordHBLeft   = transform.Find("swordHBLeft").gameObject;
     sprite        = GetComponent <SpriteRenderer>();
     canTakeDamage = true;
 }
示例#13
0
    // Start is called before the first frame update
    void Start()
    {
        // Init the player lives.
        int     lifeCount     = EntityStats.Instance.GetLivesOfEntity("Player");
        Vector2 lastPlayerPos = Vector2.zero;

        for (int i = 0; i < lifeCount; i++)
        {
            newLives.Add(Instantiate(originalFeather, playerLifeParent.transform));

            string newName = "Life0" + (i + 1);
            newLives[i].name = newName;

            if (newLives.Count > 1)
            {
                newLives[i].GetComponent <RectTransform>().anchoredPosition = new Vector2(lastPlayerPos.x + featherOffsetX, 0);
            }

            lastPlayerPos = newLives[i].GetComponent <RectTransform>().anchoredPosition;
        }

        // Init the bosses phases.
        bwain = EntityStats.Instance.GetObjectOfEntity("Boss").GetComponent <BossBrain>();
        Vector2 lastPos = Vector2.zero;

        for (int i = 0; i < bwain.m_bossPhaseList.Count; i++)
        {
            newFeathers.Add(Instantiate(originalFeather, featherParent.transform));

            string newName = "Feather0" + (i + 1);
            newFeathers[i].name = newName;

            if (newFeathers.Count > 1)
            {
                newFeathers[i].GetComponent <RectTransform>().anchoredPosition = new Vector2(lastPos.x + featherOffsetX, 0);
            }

            lastPos = newFeathers[i].GetComponent <RectTransform>().anchoredPosition;
        }

        // Sub to the event system.
        EntityStats.Instance.onPlayerLifeLost  += EntityStats_OnPlayerLifeLost;
        EntityStats.Instance.onBossPhaseChange += EntityStats_OnBossPhaseChange;
    }