public void ApplyDamage(int damage) { SpawnController spawnController = GetComponent <SpawnController>(); SpriteAnimation spriteAnimation = GetComponentInChildren <SpriteAnimation>(); PlayerMovement playerMovement = GetComponent <PlayerMovement>(); EnemyAnimation enemyAnimation = GetComponentInChildren <EnemyAnimation>(); EnemyMovement enemyMovement = GetComponent <EnemyMovement>(); if (gameObject.tag == "Player") { health -= damage; if (health == 0) { spawnController.activeRespawnTimer = true; spriteAnimation.explode = true; playerMovement.speed = 0.0f; playerMovement.turnSpeed = 0.0f; } } if (gameObject.tag == "Enemy") { health -= damage; if (health == 0) { spawnController.activeRespawnTimer = true; enemyAnimation.explode = true; enemyMovement.aiSpeed = 0.0f; enemyMovement.aiTurnSpeed = 0.0f; } } }
public void Initialize(Vector2Int locationOnRoomGrid, LevelGenerator.Room[,] roomGrid, GameObject player, SpawnController spawnController) { this.locationOnRoomGrid = locationOnRoomGrid; this.roomGrid = roomGrid; alreadySpawned = new bool[roomGrid.GetLength(1), roomGrid.GetLength(0)]; playerObject = player; boundsDict = new Dictionary <LevelGenerator.Room, Bounds>(); foreach (var room in roomGrid) { if (room != null) { var tilemap = room.roomGameObject.transform.Find("Walls").GetComponent <Tilemap>(); var bounds = tilemap.localBounds; var worldBounds = new Bounds(tilemap.LocalToWorld(bounds.center), tilemap.localBounds.size); boundsDict[room] = worldBounds; } } _spawnController = spawnController; isInitalized = true; }
void Start() { rb2d = GetComponent <Rigidbody2D>(); anim = GetComponent <Animator>(); currentState = playerState.idle; spawnController = GameObject.Find("GameController").GetComponent <SpawnController>(); }
void Awake() { audioCont = FindObjectOfType <AudioController>(); abilityCont = FindObjectOfType <AbilityController>(); challengeCont = FindObjectOfType <ChallengeController>(); spawnCont = FindObjectOfType <SpawnController>(); UICont = FindObjectOfType <UIController>(); isFollowing = true; fireParticles = GetComponentsInChildren <ParticleSystem>(); healthBarCont = FindObjectOfType <HealthBarController>(); float[] zeroDataFloat = new float[11]; for (int i = 0; i < zeroDataFloat.Length; i++) { zeroDataFloat[i] = 0; } damageTaken = zeroDataFloat; gameCont = FindObjectOfType <GameController>(); life = defaultLife; camera = FindObjectOfType <CameraController>(); transform.position = new Vector3(Camera.main.ScreenToWorldPoint(Input.mousePosition).x, Camera.main.ScreenToWorldPoint(Input.mousePosition).y, 0); rig = GetComponent <Rigidbody2D>(); position = transform.position; isMobileBuild = (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer) ? true : false; StartCoroutine(RestartPosition()); effect = Instantiate(abilityEffects[abilityCont.GetActiveAbility()], transform); effect.transform.localPosition = Vector3.zero; //audioSource = effect.GetComponentInChildren<AudioSource>(); comboCount = 0; comboSum = 0; }
// Start is called before the first frame update void Start() { rb.velocity = transform.right * speed; StageManagerGameObject = GameObject.Find("StageManager"); StageManagerScript = StageManagerGameObject.GetComponent <StatManager>(); spawnControllerScript = StageManagerGameObject.GetComponent <SpawnController>(); }
void Start() { //Time.timeScale = 5; //StartCoroutine(EndGameTimer()); _spawn = SpawnController.Instance; birdHitCounter = 0; }
void InitLevel(string[] rows) { GameFieldModel fieldModel = new GameFieldModel(rows); PlayerModel playerModel = new PlayerModel(new FieldBounds(fieldModel.Width, fieldModel.Height), TileUtility.GetTiles(TileType.Body, fieldModel.Tiles)); GameFieldView fieldView = gameField.GetComponent <GameFieldView> (); Player playerView = player.GetComponent <Player> (); PlayerController playerController = new PlayerController(playerModel, playerView); GameFieldController gameFieldController = new GameFieldController(fieldModel, fieldView); LevelModel levelModel = new LevelModel(); LevelView levelView = GetComponent <LevelView> (); StepTimer tickTimer = GetComponent <StepTimer> (); StepTimerController timerController = new StepTimerController(levelModel, playerView, tickTimer); StatusPanelView statusView = statusPanel.GetComponent <StatusPanelView> (); StatusPanelController statusPanelController = new StatusPanelController(levelModel, statusView); SpawnController spawnController = new SpawnController(fieldModel, playerModel); LevelController levelController = new LevelController(playerModel, fieldModel, levelModel, levelView, tickTimer); }
void Awake() { spawncontroller = GameObject.Find("SpawnController").GetComponent <SpawnController>(); toyAnim = GetComponent <Animator>(); toymove = GetComponent <ToyMove>(); agent = GetComponent <NavMeshAgent>(); }
public void CmdRequestOffensiveTroopSpawn(int troopId, int laneId) { TeamController myTeamController = GameObject.FindGameObjectWithTag(GameController.GAME_CONTROLLER_TAG).GetComponent <GameController>().GetMyTeamController(id); SpawnController spawnController = GameObject.FindGameObjectWithTag(SpawnController.SPAWN_CONTROLLER_TAG).GetComponent <SpawnController>(); int cost = Params.NPC_COST[troopId]; bool successfulPurchase = myTeamController.SpendGold(cost); if (successfulPurchase) { if (troopId == Params.KING_TROOP_ID) { if (teamAIEnabled == false) { if (myTeamController.Result == 0) { RpcSetSpendGoldAnim(); } } RpcClientPlaySingleSound(Params.SWORD); } else if (troopId == Params.RAM_TROOP_ID) { RpcClientPlaySingleSound(Params.HORN); } StartCoroutine(spawnController.SpawnOffensiveTroop(troopId, laneId, myTeamId, opponentsTeamId)); myTeamController.ResetSendTroopAlert(myTeamId); } else { RpcClientPlaySingleSound(Params.COINS); } }
// Start is called before the first frame update void Start() { //Cache components myRigidBody = GetComponent <Rigidbody2D>(); myAnimator = GetComponent <Animator>(); myCollider = GetComponent <BoxCollider2D>(); player = GameObject.Find("Player"); controller = GameObject.Find("SpawnController").GetComponent <SpawnController>(); //Determine direction of shed RaycastHit2D check = Physics2D.Raycast(transform.position, Vector2.down, 20f, 1 << 8); if (check.collider != null) { initialDirection = Vector2.down; } check = Physics2D.Raycast(transform.position, Vector2.right, 20f, 1 << 8); if (check.collider != null) { initialDirection = Vector2.right; } check = Physics2D.Raycast(transform.position, Vector2.left, 20f, 1 << 8); if (check.collider != null) { initialDirection = Vector2.left; } check = Physics2D.Raycast(transform.position, Vector2.up, 20f, 1 << 8); if (check.collider != null) { initialDirection = Vector2.up; } }
public void ApplyDamage(int damage) { SpawnController spawnController = GetComponent <SpawnController>(); PlayerMovement playerMovement = GetComponent <PlayerMovement>(); EnemyMovement enemyMovement = GetComponent <EnemyMovement>(); if (gameObject.tag == "Player") { health -= damage; if (health == 0) { spawnController.activeRespawnTimer = true; playerMovement.speed = 0.0f; //reset values after respawn timer playerMovement.turnSpeed = 0.0f; //health = 4; } } if (gameObject.tag == "Enemy") { health -= damage; if (health == 0) { spawnController.activeRespawnTimer = true; enemyMovement.aiSpeed = 0.0f; //reset values after respawn timer enemyMovement.aiTurnSpeed = 0.0f; //health = 4; } } }
public override void OnInspectorGUI() { m_Target = (target as SpawnController); if (m_Target.gameObject.name != "Spawn Controller") { m_Target.gameObject.name = "Spawn Controller"; } EditorGUILayout.Space(); if (m_Target.Inside()) { EditorGUILayout.HelpBox("Unable to instantiate the player", MessageType.Error); EditorGUILayout.Space(); m_Target.WireCubeColor = Color.red; } else { m_Target.WireCubeColor = Color.green; } EditorGUI.BeginChangeCheck(); GameObject player = (GameObject)EditorGUILayout.ObjectField("Player", m_Target.player, typeof(GameObject), false); if (EditorGUI.EndChangeCheck()) { Undo.RecordObject(target, "Changed Player"); m_Target.player = player; } if (m_Target.player == null) { EditorGUILayout.HelpBox("You must assign a player to instantiate", MessageType.Warning); } if (m_Target.SetWeaponsManager()) { if (m_Target.weaponEquipped.Count > m_Target.weaponsManager.maxWeapons) { for (int i = m_Target.weaponEquipped.Count; i > m_Target.weaponsManager.maxWeapons; i--) { m_Target.weaponEquipped.Remove(m_Target.weaponEquipped[i - 1]); } } DrawWeaponEquipped(); EditorGUI.BeginChangeCheck(); int maxWeapons = EditorGUILayout.IntSlider("Max Weapons Selected", m_Target.weaponsManager.maxWeapons, 0, 10); if (EditorGUI.EndChangeCheck()) { Undo.RecordObject(target, "Changed Max Weapons Selected"); m_Target.weaponsManager.maxWeapons = maxWeapons; } DrawWeaponList(); } }
public SpawnPoint(SpawnController spawner, string type, Vector2 position) { SpawnController = spawner; GameObjectType = type; Position = position; OriginalPosition = position; }
void Start() { wb = FindObjectOfType <WeaponBench>(); pab = FindObjectOfType <PassiveBench>(); pob = FindObjectOfType <PowerupBench>(); mp = FindObjectOfType <MusicPlayer>(); ic = FindObjectOfType <InputController>(); gops = FindObjectOfType <GameOptions>(); TMPBUI = GameObject.Find("TMPBUI").GetComponent <TextMeshProUGUI>(); TMPTUT = GameObject.Find("TMPTUT").GetComponent <TextMeshProUGUI>(); TMPTUI = GameObject.Find("TMPTUI").GetComponent <TextMeshProUGUI>(); TMPHS = GameObject.Find("TMPHS").GetComponent <TextMeshProUGUI>(); TMPBank = GameObject.Find("TMPBank").GetComponent <TextMeshPro>(); TMPTime = GameObject.Find("TMPTime").GetComponent <TextMeshPro>(); tutanim = TMPTUT.GetComponent <Animator>(); altar = FindObjectOfType <Altar>(); player = FindObjectOfType <Player>(); statl = FindObjectOfType <StatLibrary>(); sc = FindObjectOfType <SpawnController>(); TMPHS.text = ""; TMPTUT.text = ""; ClearStats(); killtext = "Kill enemies to get necromantic energy (Detrizide)."; dttext = "Press or hold the " + ic.Detrizide + " key when weapon is flashing to spend energy and cast spells. Do this constantly."; weapontext = "Collect weapons from the gold flashing altar in the middle once their cost has been paid."; passivetext = "Collect passive upgrades from the blue flashing altar to the west once their cost has been paid. "; poweruptext = "Powerups will periodically become available. Acquire them from the red flashing altar in the east to temporarily gain a bonus."; ammotext = "Some weapons run out of ammo. Switch weapons using " + ic.CycleWeapons + " or " + ic.NextWeapon + " to refill ammo."; swtext = "The Void Cannon and Devourer weapons are superweapons. These do immense damage, but cost banked Detrizide to use. Cost increases each use. "; }
void Awake() { if (_instance == null) { _instance = this; } }
// Use this for initialization void Start() { instance = this; player = GameObject.FindWithTag("Player").transform; StartSpawn(); }
private GameObject GetNearestEnemy(WaveType type) { GameObject leftEnemy = leftSpawner.GetNearestEnemy(type); GameObject rightEnemy = rightSpawner.GetNearestEnemy(type); if (leftEnemy == null) { nearestEnemyOrigin = rightSpawner; return(rightEnemy); } else if (rightEnemy == null) { nearestEnemyOrigin = leftSpawner; return(leftEnemy); } else { if (leftEnemy.GetComponent <Enemy> ().GetDistanceToDeath() < rightEnemy.GetComponent <Enemy> ().GetDistanceToDeath()) { nearestEnemyOrigin = leftSpawner; return(leftEnemy); } else { nearestEnemyOrigin = rightSpawner; return(rightEnemy); } } }
//public UnityEvent _onSliderChange void Awake() { gameManager = FindObjectOfType <GameManager> (); spawnController = GetComponentInParent <SpawnController> (); // setting modifier here, but it would be dynamic based on enemy type modifier = 1; }
// Use this for initialization void Start () { this.isCollisable = true; this.isPlayerScaped = false; this.parent = FindObjectOfType (typeof(SpawnController)) as SpawnController; this.player = FindObjectOfType(typeof(PlayerController)) as PlayerController; this.game = FindObjectOfType(typeof(GameController)) as GameController; }
// Use this for initialization void Start() { sprite = GetComponent <SpriteRenderer>(); lvlController = GameObject.Find("score").GetComponent <LevelController>(); spawnController = GameObject.Find("spawner").GetComponent <SpawnController>(); player = FindObjectOfType <Player>().transform; Rigidbody2D rb = GetComponent <Rigidbody2D>(); if (this.gameObject.tag == "enemy_0") { var speedd = Random.Range(-2, -8); rb.velocity = new Vector2(0, speedd); // Faz o inimigo rodar em si mesmo aleatoriamentre entre -200 e 200 rb.angularVelocity = Random.Range(-180, 180); // Destroi o inimigo após 3s, que ele não está mais visível na tela Destroy(gameObject, 15); } if (this.gameObject.tag == "enemy_2_1") { rb.angularVelocity = Random.Range(-200, 200); } if (this.gameObject.tag == "enemy_1_3") { rb.velocity = transform.up * speed; } if (this.gameObject.tag == "enemy_1_1" || this.gameObject.tag == "enemy_1_2") { var speedd = Random.Range(-1, -4); rb.velocity = new Vector2(0, speedd); } }
void FillSpawnerList() { SpawnController spawnCtlr = target as SpawnController; if (null == spawnCtlr) { return; } Transform[] gos = spawnCtlr.GetComponentsInChildren <Transform>() as Transform[]; if (null == gos) { return; } spawnerList.Clear(); for (int i = 0; i < gos.Length; i++) { ISpawner spawner = (ISpawner)gos[i].GetComponent("ISpawner"); if (null != spawner) { spawnerList.Add(spawner); transList.Add(gos[i]); } } }
protected override void ExecuteAction() { for (int i = 0; i < unitsToSpawn.Count; i++) { SpawnController.SpawnUnit(unitsToSpawn[i], (byte)playerOwner, spawnPoint); } }
// Start is called before the first frame update void Start() { myEnemy = GameObject.FindWithTag("Enemy").GetComponent <Enemy>(); mySpawnController = GameObject.FindWithTag("System").transform.Find("SpawnController").GetComponent <SpawnController>(); towerX = mySpawnController.getTowersX(); warningImage = gameObject.GetComponent <Image>(); }
// Use this for initialization void Start () { instance = this; player = GameObject.FindWithTag ("Player").transform; StartSpawn (); }
void Start() { spawnController = (SpawnController)FindObjectOfType(typeof(SpawnController)); var distanseBetweenObstacles = spawnController.DistanceBetweenSpawnObstacles; gameObject.transform.localPosition = new Vector3(0f, 0f, -distanseBetweenObstacles * 2); }
//MENU BUTTON CODE public void StartGame() { Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; playerObj.transform.position = PlayerInitialPosition; SetCameraParent("Player"); Countdown.StartAnimation(); MainMenuPanel.SetActive(false); ScorePanel.SetActive(true); PulsePanel.SetActive(true); for (int i = 0; i < GameObject.FindGameObjectsWithTag("wall").Length; i++) { Destroy(GameObject.FindGameObjectsWithTag("wall") [i].gameObject); } for (int i = 0; i < GameObject.FindGameObjectsWithTag("Point").Length; i++) { Destroy(GameObject.FindGameObjectsWithTag("Point") [i].gameObject); } SpawnController.SpawnPointSphere(); }
void Awake() { m_spawnController = GameObject.FindWithTag("SpawnController").GetComponent<SpawnController>(); if(!m_camera) m_camera = Camera.main; }
void Awake() { m_spawnController = GameObject.FindWithTag("SpawnController").GetComponent<SpawnController>(); if(m_spawnController) m_spawnController.RegisterSpawner(this); }
private void CmdInitialisePlayer() { id = FindObjectsOfType <Player>().Length - 1; RegisterModel(PLAYER_TAG, id); GameController gameController = GameObject.FindGameObjectWithTag(GameController.GAME_CONTROLLER_TAG).GetComponent <GameController>(); gameController.DeactiveScreenCamera(); Transform transform = gameController.GetPlayerTransform(id); RpcSetPlayerTransform(transform.position, transform.rotation); myTeamId = gameController.GetMyTeamControllerId(id); tag = PLAYER_TAG + " " + myTeamId; RpcSetRenderTexture(myTeamId); opponentsTeamId = gameController.GetOpponentsTeamControllerId(id); laneId = (myTeamId == TeamController.TEAM1) ? (id / 2) : (id - 1) / 2; SpawnController spawnController = GameObject.FindGameObjectWithTag(SpawnController.SPAWN_CONTROLLER_TAG).GetComponent <SpawnController>(); for (int i = 0; i <= 2; i++) { RpcSetCrossbowTargets(spawnController.CalculateDefaultCrossbowTarget(i, laneId, myTeamId)); } RpcHighlightSector(myTeamId, laneId); }
public static void StartCutScene(System.Action _EndCall = null) { if (StartCheck) { return; } EndCall = _EndCall; GameInfoBase.NotTimeUpdate = true; Time.timeScale = 1; StartCheck = true; CutSceneSendMessage.PauseAllUnits(true); spawnCtlr = getSpawnController(); spawnCtlr.setNpcActiveExceptBoss(false); G_GameInfo.GameInfo.StartCoroutine(SetCutScene()); //< 기본 UI들을 숨겨준다 UIMgr.setHudPanelVisible(false); UIMgr.setInGameBoardPanelVisible(false); TempCoroutine.instance.StartCoroutine(BossAnimationPlayed()); }
public static void StartBossCutScene(System.Action _EndCall = null) { if (StartCheck) { return; } EndCall = _EndCall; GameInfoBase.NotTimeUpdate = true; //< 기본 UI들을 숨겨준다 //GameObject InGameHUDPanelGO = UIMgr.GetUI("UIPanel/InGameHUDPanel"); UIMgr.setHudPanelVisible(false); UIMgr.setInGameBoardPanelVisible(false); Time.timeScale = 1; StartCheck = true; CutSceneSendMessage.PauseAllUnits(true); spawnCtlr = getSpawnController(); spawnCtlr.setNpcActiveExceptBoss(false); bossCutSceneCoroutine = DoBossCutScene2(); G_GameInfo.GameInfo.StartCoroutine(bossCutSceneCoroutine); }
void onEnable() { t = (SpawnController)target; GetTarget = new SerializedObject(t); // Find the List in our script and create a reference of it ThisList = GetTarget.FindProperty("minionWays"); }
public void SetWord() { GameObject go = GameObject.Find("SpawnController"); SpawnController other = (SpawnController)go.GetComponent(typeof(SpawnController)); word = other.ReturnWord(); }
private void Start() { spawnController = GameObject.Find("SpawnController").GetComponent <SpawnController>(); scoreTracker = GameObject.Find("ScoreAmount").GetComponent <ScoreTracker>(); hitSoundSource = this.gameObject.GetComponent <AudioSource>(); health = maxHealth; }
// Use this for initialization void Awake() { blockMisplay = false; gravity = "down"; blockIndex = 0; blocksToPlace = new string[4] { "blue", "red", "yellow", "green"}; gravitySpeed = 2f; spawnCtr = GameObject.Find("SpawnController").GetComponent<SpawnController>(); border = GameObject.Find("Border").GetComponent<Border>(); spawnCtr.beginSpawn(); }
internal SpawnPoint(SpawnController spawner, Squared.Tiled.Object obj) { SpawnController = spawner; Size = new Vector2(obj.Width, obj.Height); Position = new Vector2(obj.X, obj.Y) + Size / 2; OriginalPosition = new Vector2(obj.X, obj.Y) + Size / 2; Name = obj.Name; Properties = obj.Properties; GameObjectType = obj.Type; }
void Awake() { colliding = false; placed = false; //spawnCtr = GameObject.FindGameObjectWithTag("SpawnController").GetComponent<SpawnController>(); //gameCtr = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameController>(); spawnCtr = GameObject.Find("SpawnController").GetComponent<SpawnController>(); gameCtr = GameObject.Find("GameController").GetComponent<GameController>(); rb = GetComponent<Rigidbody2D>(); gravitySpeed = gameCtr.gravitySpeed; origGravitySpeed = gameCtr.gravitySpeed; }
public GameScreen(AbyssGame game) { Game = game; world = new World(new Vector2(0, GRAVITY)); UnitConverter.SetDisplayUnitToSimUnitRatio(PIXELS_PER_METER); Camera = new FarseerCamera(ref AbyssGame.spriteBatch, AbyssGame.Assets, Game.GraphicsDevice, AbyssGame.ScreenWidth, AbyssGame.ScreenHeight, ref world, PIXELS_PER_METER); Camera.viewMode = FarseerCamera.ViewMode.Scroll; GameObjects = new List<GameObject>(5); //probably a good starting number SpawnController = new SpawnController(this); Camera.subjetDistanceToScreenEdge = 700; explosionParticleEffect = new ParticleEntity(this, "BasicFireball"); addObject(explosionParticleEffect); osd = new OSD(); osd.LoadContent(); rt = new RenderTarget2D(Game.GraphicsDevice, Game.GraphicsDevice.PresentationParameters.BackBufferWidth, Game.GraphicsDevice.PresentationParameters.BackBufferHeight); }
private void Start() { _spawnPoint = GetComponent<SpawnController>(); }
void Start() { instance = this; spawnPositions = new List<List<Vector3>>(); for(int i = 0; i < 5; i++) { spawnPositions.Add(new List<Vector3>()); foreach(GameObject thisTile in GameObject.FindGameObjectsWithTag("Spawn" + i)) { spawnPositions[i].Add(thisTile.transform.position); } } }
/************************************************************ * Event Handlers ************************************************************/ private void Awake() { _captureController = global::CaptureController.Instance; _spawnController = global::SpawnController.Instance; _teamMenuManager = global::TeamMenuManager.Instance; _userController = global::UserController.Instance; _weaponContainer = global::WeaponContainer.Instance; }
// Use this for initialization void Start() { spawnCtr = GameObject.FindGameObjectWithTag("SpawnController").GetComponent<SpawnController>(); gameCtr = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameController>(); }
void Awake() { m_camera = Camera.main; m_spawnController = GameObject.FindWithTag("SpawnController").GetComponent<SpawnController>(); m_hitPointsStore = m_hitPoints; SetupProgressBar(m_hitPoints); if(m_spawnController) m_spawnController.RegisterSpawnedBuilding(this); m_original = GetComponent<Renderer>().material; if(m_buildingDetection) m_buildingDetection.SetActive(false); }
// Use this for initialization void Start() { moveTowerInitial = false; spawner = GameObject.Find("SpawnLocation").GetComponent<SpawnController>(); playMode = false; rangeMode = false; lostGame = false; }
void Awake() { m_camera = Camera.main; m_spawnController = GameObject.FindWithTag("SpawnController").GetComponent<SpawnController>(); m_hitPointsStore = m_hitPoints; SetupProgressBar(m_hitPoints); }
void Awake() { // Setting up the references. anim = GetComponent <Animator> (); playerAudio = GetComponent <AudioSource> (); spawnController = GetComponent <SpawnController> (); firstPersonController = GameObject.FindGameObjectWithTag ("GameController").GetComponent<FirstPersonController>(); // playerMovement = GetComponent <PlayerMovement> (); // playerShooting = GetComponentInChildren <PlayerShooting> (); damageImage.color = Color.black; currentHealth = maxHealth; spawnPoint = "PlayerSpawn0"; spawnController.spawn(spawnPoint); firstPersonController.enabled = true; }
/************************************************************ * Event Handlers ************************************************************/ private void Awake() { _matchRoundMenuManager = global::MatchRoundMenuManager.Instance; _teamsController = global::TeamsController.Instance; _spawnController = global::SpawnController.Instance; _hudController = global::HUDController.Instance; _captureController = global::CaptureController.Instance; _userController = global::UserController.Instance; }
void Start() { GameObject scoreEnt = GameObject.FindGameObjectWithTag("Score"); scoreController = scoreEnt.GetComponent("ScoreController") as ScoreController; spawnController = scoreEnt.GetComponent("SpawnController") as SpawnController; }
private void Start() { curMaxSpeed = maxSpeed; anim = GetComponent<Animator>(); spawnController = GameObject.Find("SpawnController").GetComponent<SpawnController>(); if (networkView.isMine) { networkView.RPC ("UpdateNickName", RPCMode.OthersBuffered, playerInfo.GetNickname()); inventory = new Inventory(); inventory.SpriteInventory = InventoryTexture; } minScale = new Vector3(1.756218f,1.756218f,1f); health = 0.25f; lastTimeHealth = Time.time; spawnController.SpawnPlayer(gameObject); }
// Use this for initialization void Start() { PMC_PlayerManagerClass = GetComponent<PlayerManager>(); spawnController = GameObject.Find("SpawnController").GetComponent<SpawnController>(); scoreManager = GameObject.Find("ScoreManager").GetComponent<ScoreManager>(); health = MaxHealth; }
void Awake() { m_spawnController = GameObject.FindWithTag("SpawnController").GetComponent<SpawnController>(); m_parentComponent = gameObject.transform.parent.gameObject.GetComponent<Enemy>(); }
void Awake() { // Register the singleton if (Instance != null) { Debug.LogError("Multiple instances of SpawnController!"); } Instance = this; }
void Awake() { m_spawnController = GameObject.FindWithTag("SpawnController").GetComponent<SpawnController>(); }
} //read-only //called before start: get references private void Awake() { if (camera == null) { camera = Camera.main; } release = (GameObject)Resources.Load("Release"); animator = GetComponent<Animator>(); uiController = GetComponent<UIController>(); spawnController = GameObject.Find("Spawner").GetComponent<SpawnController>(); applicationRenderer = GameObject.Find("Application").GetComponent<SpriteRenderer>(); }
public static void Reset() { _instance = null; }