Esempio n. 1
0
 public void LoseHealth(int loss)
 {
     FloatingTextController.CreateFloatingText(loss.ToString(), transform);
     //healthPoints -= loss;
     healthPoints -= 0;
     CheckIfGameOver();
 }
Esempio n. 2
0
    void Start()
    {
        inputController = Camera.main.GetComponent <TutorialInputController>();
        uiController    = Camera.main.GetComponent <TutorialUIController>();
        soundController = gameObject.GetComponent <SoundController>();
        camController   = Camera.main.GetComponent <CameraController>();

        TileFactory.tileMaterial = tileMaterial;
        matrix = new Matrix(MapParser.ReadMap("Maps/tutorial"));
        MapDrawer.instantiateMap(matrix.getIterable());
        players = new List <Player> ();
        players.Add(new Player("Jugador", StatsFactory.GetStat(SlimeCoreTypes.SLOTH)));         // Test with 2 players
        //players.Add(new Player("IA Tutorial", 1, StatsFactory.GetStat(SlimeCoreTypes.SLOTH))); // Test with 2 players
        players[0].SetColor(new Color(1, 1, 1));
        //players[1].SetColor(new Color(1,0,1));
        playerSlime = SlimeFactory.instantiateSlime(players[0], new Vector2(0f, -2f));
        //SlimeFactory.instantiateSlime(players[1], new Vector2(0f,2f));
        status        = GameControllerStatus.WAITINGFORACTION;
        currentPlayer = players [0];
        uiController.UpdateRound(currentTurn + 1);
        uiController.UpdatePlayer(GetCurrentPlayer().GetColor());
        uiController.UpdateActions(playerActions, GetCurrentPlayer().actions);
        uiController.ShowBothPanels();

        InitDialogChains();
        InitMarker();
        marker.SetParentTransform(playerSlime.transform);
        marker.SetMarkerRelativeSize();
        marker.SetActive(false);
        FloatingTextController.Initialize();
    }
Esempio n. 3
0
    public void addDamage(float damage)
    {
        if (damage <= 0)
        {
            return;
        }

        healthSlider.gameObject.SetActive(true);
        currentHealth -= damage;
        FloatingTextController.CreateFloatingText(damage.ToString(), FightManager.currPlayer.transform);
        healthSlider.value = currentHealth;
        damaged            = true;


        // player damaged animation
        gameObject.GetComponent <Animator>().SetTrigger("isPushed");

        if (AutoMove.playerContact == true)
        {
            gameObject.GetComponent <Animator>().SetInteger("State", 0);
        }

        //playerAS.clip = playerHurt;
        //playerAS.Play();

        //       playerAS.PlayOneShot(playerHurt); //same

        if (currentHealth <= 0)
        {
            makeDead();
        }
    }
Esempio n. 4
0
    // Use this for initialization
    void Awake()
    {
        if (SceneManager.GetActiveScene().buildIndex != 0)
        {
            if (instance == null)
            {
                instance = this;
            }
            else if (instance != this)
            {
                Destroy(gameObject);
            }

            DontDestroyOnLoad(gameObject);

            FloatingTextController.Initialize();

            weaponScript = GetComponent <WeaponManager>();
            weaponScript.PopulateWeaponList();

            boardScript = GetComponent <BoardManager>();
            boardScript.SetupScene();

            turnScript = GetComponent <TurnManager>();
            turnScript.RollInitiative();
            turnScript.SetQueueIndex(0);
            turnScript.SetWhosTurn();

            whosTurn = WhosTurn();
        }
    }
Esempio n. 5
0
 // Use this for initialization
 void Start()
 {
     FloatingTextController.Initialize();
     itemGainedController.Initialize();
     crateTimer = 0f;
     maxTimer   = 8f;
 }
Esempio n. 6
0
    public override void TakeDamage(Damage damage)
    {
        int random = Random.Range(0, 101);

        /*print(random)*/
        ;
        //print(damage.HitChance);
        print("hit chance: " + damage.HitChance);
        print("dodge: " + Stats.Dodge);
        if (((damage.HitChance - Stats.Dodge) < random))
        {
            FloatingText floatingText = FloatingTextController.CreateFloatingText("MISS", gameObject.transform);
            floatingText.transform.localScale = new Vector3(1.25f, 1.25f);
        }
        else // DID HIT
        {
            FloatingText floatingText = FloatingTextController.CreateFloatingText(damage.DamageAmount.ToString(), gameObject.transform);
            if (damage.DidCrit)
            {
                floatingText.transform.localScale = new Vector3(1.4f, 1.4f);
                floatingText.SetCritColor();
            }
            EnemyMovement.knockable.AddXKnockback(damage.Knockback);
            EnemyMovement.stun.AddStun(damage.Stun);
            HealthDamaged(damage.DamageAmount);
        }
        if (Stats.CurrentHealth <= 0)
        {
            PlayDeathAnim();
        }
    }
Esempio n. 7
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Esempio n. 8
0
    // Update is called once per frame
    void Update()
    {
        if (Vector2.Distance(gameObject.transform.position, PlayerController.player.GetComponent <Transform>().position) < 2f)
        {
            timeint = Time.time - time;
            if (onCD == 1)
            {
                if (timeint > cd)
                {
                    onCD = 0;
                }
                damageFlash.color = Color.Lerp(damageFlash.color, Color.clear, flashSpeed * Time.deltaTime);
            }
            else
            {
                PlayerController.health -= pdmg;
                damageFlash.color        = flashColour;
                onCD = 1;
                time = Time.time;
            }
        }
        hpBar.localScale = new Vector3(2f, (origscaley * hp / maxhp), 1);

        if (hp <= 0)
        {
            FloatingTextController.bounty(bounty, this.transform.position.x, this.transform.position.y);
            Cursor.SetCursor(cursor, Vector2.zero, CursorMode.Auto);
            KillEnemy(enemy);
            PlayerController.flow += bounty;
        }
    }
Esempio n. 9
0
    private void OnTriggerStay2D(Collider2D collision)
    {
        if (collision.tag == "Monster" || collision.tag == "Boss")
        {
            if (collision.GetComponent <enemyHealth>().currentHealth < 0)
            {
                return;
            }
            this.GetComponent <Rigidbody2D>().velocity = new Vector3(0, 0, 0);

            this.GetComponent <Animator>().SetTrigger("Hit");
            SfxManager.PlaySound("FireBallHit");

            float damage = (float)SaveManager.Instance.gestureDMG[4];
            if (!damageShown)
            {
                FloatingTextController.CreateFloatingText(damage.ToString(), transform);
                damageShown = true;
            }
            FightManager.currEnemy.gameObject.GetComponent <enemyHealth>().addDamage(damage);

            //duration of animation
            StartCoroutine(destroyAfterTime(0.77f));
        }
    }
Esempio n. 10
0
    public void ItemCollected(ItemType item)
    {
        if (itemPickUpSound != null)
        {
            itemPickUpSound.Play();
        }

        switch (item)
        {
        case ItemType.Sword:
            hasSword  = true;
            atkSpeed  = 0.6f;
            atkDamage = 10;
            break;

        case ItemType.Armor:
            defenseReduction = 2f;
            spriteAnimator.SetBool("bHasArmor", true);
            spriteAnimator.SetTrigger("GoToIdle");
            break;

        case ItemType.Soul:
            health += 70;
            UpdateHealthBar();
            spriteAnimator.SetBool("bIsGhost", false);
            spriteAnimator.SetTrigger("GoToIdle");
            break;

        case ItemType.Potion:
            health += 10;
            UpdateHealthBar();
            FloatingTextController.CreateFloatingText("+10", transform);
            break;
        }
    }
Esempio n. 11
0
 public void SetMass(int mass, bool popup)
 {
     if ((int)(mass - this.mass) > 0)
     {
         if (popup)
         {
             FloatingTextController.CreateFloatingText(printInteger((int)(mass - this.mass)), this.transform, Color.green);
         }
     }
     else if ((int)(mass - this.mass) < 0)
     {
         if (popup)
         {
             FloatingTextController.CreateFloatingText(printInteger((int)(mass - this.mass)), this.transform, Color.red);
         }
     }
     else
     {
         if (popup)
         {
             FloatingTextController.CreateFloatingText(printInteger((int)(mass - this.mass)), this.transform, Color.black);
         }
     }
     this.mass = mass;
     changeScaleSlime();
 }
Esempio n. 12
0
    public virtual void TakeDamage(float amount)
    {
        if (canBeDamaged)
        {
            healthBar.fillAmount = health / startingHealth;
            FloatingTextController.CreateFloatingText(amount.ToString(), transform);

            //healthBar.color = Color.Lerp(red, green, health / startingHealth);
            if (healthBar.fillAmount > 0.5f)
            {
                healthBar.color = Color.Lerp(yellow, green, health / startingHealth);
                tempColor       = healthBar.color;
            }
            else if (healthBar.fillAmount <= 0.5f)
            {
                healthBar.color = Color.Lerp(red, tempColor, health / startingHealth);
            }

            if (((health -= amount) <= 0) && !isDead)
            {
                healthBar.fillAmount = 0;
                healthBar.color      = green;
                SelectState(state.Dead);
                //Die();
            }
        }
    }
Esempio n. 13
0
 public void SetDie()
 {
     m_ChaseParticleSystem.SetActive(false);
     // Play Sound
     if (m_Teeth)
     {
         SoundController.Instance.PlayOneShootAudio("event:/Teeth/TeethDie", m_EnemyTransform);
     }
     else
     {
         SoundController.Instance.PlayOneShootAudio("event:/Robot/RobotDie", m_EnemyTransform);
     }
     m_Collider.enabled = false;
     // Create floating text
     FloatingTextController.CreateFloatingText(m_EnemyBlackboard.m_CoinsToDrop.ToString(), m_EnemyTransform);
     // Stop last audio
     SoundController.Instance.StopEvent(m_CurrentAudioEvent);
     // Set state  to Die and stop NavMesh
     m_CurrentState           = TEnemyStates.Die;
     m_ElapsedTime            = 0.0f;
     m_NavMeshAgent.isStopped = true;
     m_Animation.clip         = m_DieAnimationClip;
     m_Animation.Play();
     DesactivateAnimations();
     SetDieAnimation(true);
     StartCoroutine(Die());
 }
Esempio n. 14
0
 // Use this for initialization
 void Start()
 {
     regularHealth = LevelController.instance.packageWorth;
     currentHealth = regularHealth;
     //initialize the floating damage object for this package
     FloatingTextController.Initialize();
 }
Esempio n. 15
0
    // Use this for initialization
    void Start()
    {
        FloatingTextController.Initialize();
        CriticalFloatingTextController.Initialize();

        // Assignment Calls
        anim           = GetComponent <Animator>();
        Rigidbody      = GetComponent <Rigidbody2D>();
        DamageValues   = gameObject.GetComponent <EnemyDamageValues> ();
        Collider       = gameObject.GetComponent <Collider2D> ();
        MainController = GameObject.Find("Controller").GetComponent <GameController>();
        Player         = GameObject.Find("Player").GetComponent <PlayerControls>();

        // Setting elements to their proper states
        InvokeRepeating("Roam", 0, 1.5f);
        touchingGround = false;
        GetComponent <SpriteRenderer>().material = DefaultMaterial;
        MainController.EnemiesLeft++;

        if (AlienType == 1 || AlienType == 3)
        {
            AttackCollider         = gameObject.transform.GetChild(0).GetComponent <Collider2D>();
            AttackCollider.enabled = false;
        }
    }
Esempio n. 16
0
    public void Heal()
    {
        if (!thisTurn.myTurn)
        {
            return;
        }
        if (mAction == 1)
        {
            if (pAction == 1)
            {
                return;
            }
            SpendPAction();
        }
        SpendMAction();
        int damageToHeal = player.WISmod;

        if (player.currentHP + damageToHeal >= player.maxHP)
        {
            FloatingTextController.CreateFloatingText((player.maxHP - player.currentHP).ToString(), transform, false);
            player.currentHP = player.maxHP;
            return;
        }
        else
        {
            player.currentHP += damageToHeal;
            FloatingTextController.CreateFloatingText(damageToHeal.ToString(), transform, false);
        }
    }
Esempio n. 17
0
 void Start()
 {
     HealthBarMob.SetActive(false);
     animationcontroller = GetComponent <Animation>();
     vie = MaxHealth;
     FloatingTextController.Initialize();
 }
Esempio n. 18
0
    public void takeDamage(float damage, bool crit)
    {
        if (crit)
        {
            damage = damage * 2;
            CritFloatingTextController.CreateFloatingText(damage.ToString(), MyTransform, distance, crit);
        }
        else
        {
            FloatingTextController.CreateFloatingText(damage.ToString(), MyTransform, distance, crit);
        }
        health = health - damage;
        if (health <= 0)
        {
            ai.SetDestination(MyTransform.position);
            animator.SetBool("Die", true);
            body.enabled = false;
            head.enabled = false;

            if (body1 != null)
            {
                body1.enabled = false;
            }
            if (head1 != null)
            {
                head1.enabled = false;
            }
            Dead();
        }
    }
    // Update is called once per frame
    void Update()
    {
        getChargeTimer();           //find the amount of charge

        if (currentChargeTimer > 0) //if there is any charge whatsoever
        {
            if (!chargeStarted)     //this flag is in place to ensure the sound only starts once
            {
                AudioHelper.PlayClip2D(chargeSFX, 0.6f);
                chargeStarted = true;
            }

            if (currentChargeTimer >= 0.33f && firstFlash == false) //the bool ensures this only triggers once
            {
                StartCoroutine(flashCoroutine());
                firstFlash = true;
                AudioHelper.PlayClip2D(chargeTickSFX, 0.7f);
            }
            if (currentChargeTimer >= 0.66f && secondFlash == false) //similar to previous, though louder and adds the pop up text
            {
                StartCoroutine(flashCoroutine());
                secondFlash = true;
                AudioHelper.PlayClip2D(chargeTickSFX, 0.9f);
                FloatingTextController.CreateFloatingText("Max!", transform);
            }
        }
        else   //when no longer charging, resets everything to zero
        {
            firstFlash    = false;
            secondFlash   = false;
            chargeStarted = false;
            sfxClip       = GameObject.Find("2D Audio ChargingSoundEffect (UnityEngine.AudioClip)");
            Destroy(sfxClip);
        }
    }
Esempio n. 20
0
    public override IEnumerator ExecuteEffect(GameObject target, Vector3 startPosition, float characterSpeed, BaseBattleStateMachine characterStateMachine)
    {
                #pragma warning disable 0219
        GameObject attackAnimEffect = null;
        if (animationPrefab != null)
        {
            attackAnimEffect = Instantiate(animationPrefab, target.transform, false);
        }
                #pragma warning restore 0219

        yield return(new WaitForSeconds(WaitUntilFinished(characterStateMachine, target)));

        BaseBattleStateMachine targetStateMachine = target.GetComponent <BaseBattleStateMachine>();
        if (targetStateMachine != null)
        {
            FloatingTextController.CreateFloatingText(item.value.ToString(), target.transform, textColor);
            item.UseItem(targetStateMachine.character);
            if (targetStateMachine is CharacterStateMachine)
            {
                targetStateMachine.UpdateHeroPanel();
            }
        }
        #if UNITY_EDITOR
        Debug.Log("Used in battle");
        #endif
        yield return(null);
    }
Esempio n. 21
0
    void Start()
    {
        FloatingTextController.Initalize();

        sculpturePrefab      = Resources.Load <GameObject>("Prefabs/Sculpture/SculpturePrefabs");
        sculptMaterialPrefab = Resources.Load <GameObject>("Prefabs/Sculpture/Materials");

        //데이터 Load
        if (System.IO.File.Exists(DataSaver.filePath))
        {
            graver = DataSaver.LoadData <Graver>(DataSaver.filePath);
            RefreshDisplay();
        }
        else
        {
            graver = new Graver();
            graver.CurrentSculpture      = Inventory.database.FetchSculptureItemById(0);
            graver.CurrentSculptMaterial = Inventory.database.FetchMaterialItemById(0);
            Directory.CreateDirectory(Application.persistentDataPath + "/Data");
        }

        graver.CurrentSculpture.sprite = Inventory.database.FetchSculptureItemById(graver.CurrentSculpture.Id).sprite;
        animator = sprite.GetComponent <Animator>();
        Invoke("WaitCommand", 1f);
        StartCoroutine(IncreaseHealth());
        StartCoroutine(UpdateProgressBar());
    }
Esempio n. 22
0
    public virtual void TakeDamage(int amount)
    {
        if (canBeDamaged)
        {
            FloatingTextController.CreateFloatingText(amount.ToString(), transform);
            healthBar.fillAmount = health / startingHealth;

            if (healthBar.fillAmount > 0.6f)
            {
                healthBar.color = Color.Lerp(yellow, green, health / startingHealth);
            }
            else if (healthBar.fillAmount <= 0.6f)
            {
                healthBar.color = Color.Lerp(red, yellow, health / startingHealth);
            }

            if (((health -= amount) <= 0) && !isDead)
            {
                healthBar.fillAmount = 0;
                healthBar.color      = green;

                Die();
            }
        }
    }
Esempio n. 23
0
    public void DeleteExhibit(int num, Transform NPCtransform)
    {
        int   count = 0;
        float money = 0;

        for (int i = exhibits.Count - 1; i >= 0; i--)
        {
            Debug.Log("storage.items[i].Id" + storage.items[i].Id);
            if (makingController.makingInfo[storage.items[i].Id].Rank != 0)
            {
                money += storage.items[i].Price * makingController.makingInfo[storage.items[i].Id].PriceUp;
            }
            else
            {
                money += storage.items[i].Price;
            }
            Destroy(exhibits[i]);
            exhibits.RemoveAt(i);
            storage.items.RemoveAt(i);
            count++;
            if (count == num)
            {
                break;
            }
        }
        if (moneyBuff)
        {
            gc.graver.Money += money * 2;
        }
        gc.graver.Money += money;
        FloatingTextController.CreateFloatingMoneyText(money.ToString(), NPCtransform);
    }
Esempio n. 24
0
    private void MakeDamage(Unit enemy)
    {
        this.InitTeamHealthIfNotInitialized();
        enemy.InitTeamHealthIfNotInitialized();

        CalcDamageResult(enemy);
        teamDamage = (int)(damageResult * countOfWarrior);

        FloatingTextController.CreateFloatingText(teamDamage.ToString(), enemy.worldPosition);

        enemy.teamHealth -= teamDamage;

        enemy.RecountWarriors(enemy);

        if (enemy.countOfWarrior < 1)
        {
            if (enemy.isBotUnit)
            {
                BoardManager.Instance.enemyUnits.Remove(enemy);
                Bot.botTeam.Remove(enemy); //todo: refactor
            }
            else
            {
                BoardManager.Instance.playerUnits.Remove(enemy);
                Human.humanTeam.Remove(enemy); //todo: refactor
            }
            Destroy(enemy.gameObject);
        }
    }
Esempio n. 25
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.tag == "Minion" && playerController.normalAttack == true)
        {
            //Debug.Log(this.name + " Hit " + other.gameObject.name);

            //Find Minion and Minion GO
            Minion     m    = DictionaryHelper.KeyByValue <Minion, GameObject>(cgc.minionGameObjectMap, other.gameObject);
            GameObject m_go = cgc.minionGameObjectMap[m];

            // Calculate DMG
            m.MinionGethit();
            if (m.canTakeDMG == true)
            {
                FloatingTextController.CreateFloatingDMG(m.CalAndTakeDamage(), other.transform);
            }

            // Update Health Bar
            GameObject m_canvas = m_go.transform.Find("CharCanvas").gameObject;
            if (m_canvas.activeSelf == false)
            {
                m_canvas.SetActive(true);
            }
            HealthBar hb = m_canvas.GetComponentInChildren <HealthBar>();
            hb.HealthBarChange(m.HP, m.MaxHP);
        }
    }
Esempio n. 26
0
        void FixedUpdate()
        {
            if (CurrentGameObject == null)
            {
                CurrentGameObject = FloatingTextController.CreateFloatingText(EnterString, transform);
                CurrentGameObject.SetOpacity(0);
            }

            var shiftVector = new Vector3(TextOffSetAmount, TextOffSetAmount);

            shiftVector.Scale(transform.up);
            Vector2 screenPosition = UnityEngine.Camera.main.WorldToScreenPoint(transform.position + shiftVector);

            CurrentGameObject.transform.position = screenPosition;
            CurrentGameObject.transform.rotation = transform.rotation;

            if (_canGoThrough && Input.GetButtonDown("Selective Button") && AvailableForKeyPress)
            {
                CurrentGameObject.SetOpacity(0);
                DontDestroyOnLoad(GameHandler.Game.Player);
                GameHandler.Game.NewLevel = true;
                GameHandler.Game.IncreaseLevel();
                GameHandler.Game.GotoNextLevel();
            }
        }
Esempio n. 27
0
        private void FixedUpdate()
        {
            if (CurrentGameObject == null)
            {
                CurrentGameObject = FloatingTextController.CreateFloatingText(EnterString, transform);
                CurrentGameObject.SetOpacity(0);
            }

            var shiftVector = new Vector3(OffSetAmount, OffSetAmount);

            shiftVector.Scale(transform.up);
            Vector2 screenPosition = UnityEngine.Camera.main.WorldToScreenPoint(transform.position + shiftVector);

            CurrentGameObject.transform.position = screenPosition;
            CurrentGameObject.transform.rotation = transform.rotation;

            if (_availableForKeyPress && Input.GetButtonDown("Selective Button"))
            {
                CurrentGameObject.SetOpacity(0);
                Destroy(this.gameObject);
                var player     = GameObject.FindGameObjectWithTag("Player");
                var playerItem = player.GetComponent <SimpleItem>();
                playerItem.AddItem(this.gameObject);
            }
        }
Esempio n. 28
0
    private void OnTriggerEnter2D(Collider2D col)
    {
        if (col.tag == "Food")
        {
            food         += pointsPerFood;
            foodText.text = "+" + pointsPerFood + "Food: " + food;
            col.gameObject.SetActive(false);
        }

        if (col.tag == "Soda")
        {
            food += pointsPerSoda;
            //foodText.text = "+" + pointsPerSoda + "Oxygen: " + food;
            foodText.text = food.ToString();
            col.gameObject.SetActive(false);

            // Floating Combat Text
            FloatingTextController.CreateFloatingText("+" + pointsPerSoda, transform);

            audio.PlayOneShot(takeOxySound);
        }

        if (col.tag == "Exit")
        {
            Invoke("LevelSucceed", GameManager.instance.startLevelDelay);
            enabled = false;
        }
    }
Esempio n. 29
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.CompareTag("Extra"))
        {
            GameControlScript.puntos += puntos;
            if (HealthBarScript.agarrado)
            {
                HealthBarScript.health += aumento;
            }
            FloatingTextController.CreateFloatingText("+25", transform);
            anim.Play("Move");
        }

        if (other.CompareTag("Enemy"))
        {
            GameControlScript.health -= 1;
            GameControlScript.puntos -= damage;

            GameControlScript.visibilidad = false;
            HealthBarScript.resetBar      = true;
            HealthBarScript.agarrado      = false;
            FloatingTextController.CreateFloatingText("-25", transform);
            CorazonInstanceCont.CreateCorazon(transform);
            anim.Play("Obstaculo");
        }

        if (other.CompareTag("Special"))
        {
            HealthBarScript.agarrado  = true;
            GameControlScript.puntos += aumentoSpe;
            FloatingTextController.CreateFloatingText("+50", transform);
            GameControlScript.visibilidad = true;
            anim.Play("Special");
        }
    }
Esempio n. 30
0
    void Start()
    {
        FloatingTextController.Initialize(textParent, PopupTextPrefab);
        var playerCount = 2;

        spawnPoints = GameObject.FindGameObjectsWithTag("SpawnPoint");
        remainingCountdownDuration = CountdownDuration;
        playerStates     = new PlayerState[playerCount];
        playerHUDManager = new PlayerHUDManager(PlayerHUDPrefab, PlayerStatusUIPrefab, 8);

        for (var i = 0; i < playerCount; i++)
        {
            var spawnpoint   = spawnPoints[i % spawnPoints.Length];
            var player       = Instantiate(PlayerPrefab);
            var ps           = new PlayerState(player, ReInput.players.GetPlayer(i));
            var WeaponPrefab = WeaponPrefabs[ps.weaponIndex];

            //targetting
            PlayerTargettingAreas[i] = Instantiate(WeaponTargettingAreaPrefab);
            PlayerTargettingAreas[i].TestConstruct(i);

            ps.player.ID   = i;
            ps.player.name = "Player " + i;
            ps.player.Spawn(spawnpoint.transform);
            ps.player.SetWeapon(WeaponPrefab, PlayerTargettingAreas[i]);
            ps.player.SetColor(colorScheme.playerColors[i]);
            ps.player.OnValidHitOccurred += AddValidHit;
            playerStates[i] = ps;


            //PlayerTargettingAreas[i].transform.SetParent(ps.player.Weapon.transform);
        }
    }
Esempio n. 31
0
	// Use this for initialization
	void Start () {
		Debug.Log ("Simulation started");
		totemsChosen = false;
		p1TotemScript = player1Totem.GetComponent<Totem_Script>();
		p2TotemScript = player2Totem.GetComponent<Totem_Script>();
		selectionScript = UiSelectionController.GetComponent<SelectionScript>();
		fltgtxtcntrl = FloatingTxtContrlGO.GetComponent<FloatingTextController>();
	}