void Start() { HealthBarMob.SetActive(false); animationcontroller = GetComponent <Animation>(); vie = MaxHealth; FloatingTextController.Initialize(); }
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); } }
// Use this for initialization void Start() { FloatingTextController.Initialize(); itemGainedController.Initialize(); crateTimer = 0f; maxTimer = 8f; }
// 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(); } }
// 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; } }
// Use this for initialization void Start() { regularHealth = LevelController.instance.packageWorth; currentHealth = regularHealth; //initialize the floating damage object for this package FloatingTextController.Initialize(); }
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(); }
void Start() { mgm = GameObject.Find("GameManager").GetComponent <MyGameManager> (); //ScoreBoardtoGo = GameObject.Find ("DogScore").transform.localPosition; targetGen = GameObject.Find("TargetGen").GetComponent <TargetGen> (); FloatingTextController.Initialize(); }
private void Start() { m_Dead = false; // When game init change game state to play and start round InitGame(); FloatingTextController.Initialize(); // lock cursor Cursor.lockState = CursorLockMode.Locked; Cursor.visible = Cursor.visible = false; }
// Use this for initialization, can be modified by subclasses protected virtual void Start() { try{ player = GameObject.Find("Player"); }catch (MissingReferenceException e) { Debug.Log("Player cannot be found" + e); } FloatingTextController.Initialize(); }
private void Start() { FloatingTextController.Initialize(); stats.Init(); if (statusInd != null) { statusInd.SetHeath(stats.curHealth, stats.maxHealth); } }
//INICIO ////////////////////////////////////////////////////////////////////////////////////////////////////// void Start() { // Se resetea la interfase Reset(); //Comienza en instrucciones Instrucciones(); FloatingTextController.Initialize(); }
private void Awake() { if (Instance != null) { Destroy(this.gameObject); return; } Instance = this; FloatingTextController.Initialize(); }
private void Awake() { _availableForKeyPress = false; FloatingTextController.Initialize(); // TO DO: Get Key Combination EnterString = "Press E to Take"; CurrentGameObject = FloatingTextController.CreateFloatingText(EnterString, transform); CurrentGameObject.SetOpacity(0); _availableForKeyPress = false; }
protected override void Start() { animator = GetComponent <Animator>(); audio = GetComponent <AudioSource>(); food = GameManager.instance.playerFoodPoint; foodText.text = food.ToString(); base.Start(); FloatingTextController.Initialize(); }
void Start() { FloatingTextController.Initialize(); _numberOfEnemies = GameObject.FindGameObjectsWithTag("Enemy").Length; _requiredEnemy = _numberOfEnemies / 2; _canGoThrough = _requiredEnemy == 0; AvailableForKeyPress = false; EnterString = _requiredEnemy > 0 ? "Press E [" + _requiredEnemy + " Enemy to Progress]" : "Press E"; CurrentGameObject = FloatingTextController.CreateFloatingText(EnterString, transform); CurrentGameObject.SetOpacity(0); }
void Start() { Health = StartHealth; defenace = StartDefenace; FireRes = StartFireRes; WaterRes = StartWaterRes; AirRes = StartAirRes; EarthRes = StartEarthRes; Burns = SetDebuffs(PlayerStats._Burns); Frozen = SetDebuffs(PlayerStats._Frozen); Stunned = SetDebuffs(PlayerStats._Stunned); Poisoned = SetDebuffs(PlayerStats._Poisoned); FloatingTextController.Initialize(); }
// Use this for initialization void Awake() { if (instance == null) { instance = this; } else { if (instance != this) { Destroy(gameObject); } } DontDestroyOnLoad(gameObject); FloatingTextController.Initialize(); enemies = new List <Enemy>(); }
void Start() { // TO DO: Initialize At Game Handler FloatingTextController.Initialize(); // TO DO: Get Key Combination EnterString = "Press E"; if (RequireKey && KeyAmount > 0) { EnterString += " [Require " + (KeyAmount == 1 ? "a key" : (KeyAmount.ToString() + " keys")) + "]"; } CurrentGameObject = FloatingTextController.CreateFloatingText(EnterString, transform); CurrentGameObject.SetOpacity(0); ItemRoomController = new ItemRoomController(); _availableForKeyPress = false; _itemSpawned = GameObject.Find("ItemSpawned") != null; }
public new void Start() { if (GameProgress.JsonLibrary.isNewShieldAnim()) { GameObject Orb = Resources.Load <GameObject>("Prefabs/Orb4.4"); if (Orb != null) { Transform foo = ShieldParticle.transform.parent; Destroy(ShieldParticle); ShieldParticle = GameObject.Instantiate(Orb, foo); } } base.Start(); FloatingTextController.Initialize(); FoodExplosion = Resources.Load <GameObject>("Prefabs/CFX4 Hit B (Orange)"); _planetDestroyAnim = Resources.Load <GameObject>("Prefabs/CFX2_EnemyDeathSkull"); //CFX4 Hit B (Orange) //CFX4 Hit Pow //CFX4 Sparks Explosion B } //CFX3_Hit_Misc_D
void Awake() { InIntro = true; if (Instance != null && Instance != this) { Destroy(gameObject); } else { Instance = this; } canvas = GameObject.FindGameObjectWithTag("Canvas"); characterPanel = canvas.transform.Find("Panel_Character").gameObject; //StartCoroutine(ScreenFader.FadeToClear()); player = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>(); Camera.main.transform.position = player.transform.position; GameVersion = "Development V10.0"; FloatingTextController.Initialize(); EnemyHealthBarController.Initialize(); }
void Start() { gameManager = GameManager.instance; PlayBattleMusic(); Game.isFading = true; fadeAnim = GameObject.FindWithTag("FadeImage").GetComponent <Animator>(); LoadCharacters(); LoadEnemies(); battleStates = PerformAction.WAIT; HeroInput = HeroGUI.ACTIVATE; // Debug.Log(SceneManager.GetActiveScene().name); actionPanel.SetActive(false); magicPanel.SetActive(false); enemySelectPanel.SetActive(false); FloatingTextController.Initialize(floatingTextPrefab); if (m_LanguageManagerInstance == null) { m_LanguageManagerInstance = LanguageManager.Instance; } battleMessage = battleMessagePanel.GetComponentInChildren <Text>(); }
// Use this for initialization void Start() { FloatingTextController.Initialize(); CriticalFloatingTextController.Initialize(); // Assignment Calls Rigidbody = GetComponent <Rigidbody2D>(); DamageValues = gameObject.GetComponent <EnemyDamageValues> (); Collider = gameObject.GetComponent <Collider2D> (); SpriteRender = gameObject.GetComponent <SpriteRenderer>(); MainController = GameObject.Find("Controller").GetComponent <GameController> (); Player = GameObject.Find("Player").GetComponent <PlayerControls>(); DeathRayAnimation = SaucerRay.GetComponent <DeathRayAnimation>(); // Setting elements to their proper states //InvokeRepeating ("Roam", 0, 4); TouchStop = false; GetComponent <SpriteRenderer>().material = DefaultMaterial; SpriteRender.sprite = NormalAppearance; MainController.EnemiesLeft++; TouchStop = true; }
public static void ResetGame() { Debug.Log("Reset game"); FloatingTextController.Initialize(); gameState.Upgrades.Clear(); gameState.damage = gameState.initialDamage; gameState.kills = 0; gameState.currentLevel = 1; gameState.gameOver = false; gameState.blood = gameState.initialBlood; gameState.bloodSpent = 0; FindPlayer(); FindLevel(); FindDamage(); FindKills(); UpdatePlayerBlood(); UpdatePlayerLevel(); UpdatePlayerDamage(); UpdatePlayerKills(); }
private void Awake() { levelManager = FindObjectOfType <LevelManager>(); FloatingTextController.Initialize(); }
// Use this for initialization void Start() { moving = true; FloatingTextController.Initialize(); }
// Use this for initialization void Start() { score = 0; scoreText.text = "Score: " + score; FloatingTextController.Initialize(); }
// Use this for initialization void Start() { FloatingTextController.Initialize(); }
private void Start() { FloatingTextController.Initialize(); //just needs to be initialized somewhere unitController = GetComponent <UnitController>(); stateMachine = GetComponent <PlayerStateMachine>(); }
void Start() { targetPos = new Vector2(0.0f, -4.0f); FloatingTextController.Initialize(); CorazonInstanceCont.Initialize(); }