private void Start() { GameContrl = GameObject.FindWithTag("EditorOnly").GetComponent <Gamecontroller>(); _time = 3.03f; _anim = transform.GetComponent <Animator>(); _anim.enabled = false; }
void Start() { inv = GameObject.FindGameObjectWithTag("GameController").GetComponent <InventoryDatabase>(); //itemDatabase = GameObject.FindGameObjectWithTag ("GameController").GetComponent<ItemDatabase>(); control = GameObject.FindGameObjectWithTag("GameController").GetComponent <Gamecontroller>(); desc_Menu = Resources.Load <GameObject>("Prefab/Menu_Description"); }
// Use this for initialization void Start() { controll = GameObject.FindGameObjectWithTag("GameController").GetComponent <Gamecontroller>(); //button = GetComponent<Button>(); //button.onClick.AddListener(TaskOnClick); agent = GameObject.FindGameObjectWithTag("Player").GetComponent <NavMeshAgent>(); }
// Start is called before the first frame update void Start() { source = GetComponent <CriAtomSource>(); _gururinRb2d = GameObject.Find("Gururin").GetComponent <Rigidbody2D>(); playerMove = GameObject.Find("Gururin").GetComponent <PlayerMove>(); gameController = GameObject.Find("GameController").GetComponent <Gamecontroller>(); flagManager = GameObject.Find("FlagManager").GetComponent <FlagManager>(); _gpQuaternion = gearPos.transform.rotation; for (int i = 0; i < moveGear.Length; i++) { moveGear[i] = true; } //gearCol = gear.GetComponent<PolygonCollider2D>(); if (GetComponent <GanGanKamen.BossHand>() != null) { bossHand = GetComponent <GanGanKamen.BossHand>(); } if (GetComponent <GanGanKamen.BossStageGear>() != null) { stageGear = GetComponent <GanGanKamen.BossStageGear>(); } }
// Use this for initialization IEnumerator Start() { inv = GameObject.FindGameObjectWithTag("GameController").GetComponent <InventoryDatabase>(); controll = GameObject.FindGameObjectWithTag("GameController").GetComponent <Gamecontroller>(); cam = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Camera>(); agent = GameObject.FindGameObjectWithTag("Player").GetComponent <NavMeshAgent>(); playerTextRef = Resources.Load <GameObject>("Prefab/Player_Text"); playerText = Instantiate(playerTextRef); playerText.transform.SetParent(GameObject.FindGameObjectWithTag("Main Canvas").transform, false); //playerText.transform.localPosition = new Vector3(0, 200,0); playerText.transform.localScale = Vector3.one; //StartCoroutine(InputListener()); agent.autoTraverseOffMeshLink = false; while (true) { if (agent.isOnOffMeshLink) { if (method == OffMeshLinkMoveMethod.Parabola) { yield return(StartCoroutine(Parabola(agent, jumpHeight, jumpDuration))); } agent.CompleteOffMeshLink(); } yield return(null); } }
// Start is called before the first frame update void Start() { if (Instance == null) { Instance = this; } }
// Start is called before the first frame update void Start() { _source = GetComponent <CriAtomSource>(); gameController = GameObject.Find("GameController").GetComponent <Gamecontroller>(); _sourcePlay = false; _sourceVolume = _source.volume; }
// Start is called before the first frame update void Start() { blocking = false; _pushSE = GameObject.Find("SE_item(CriAtomSource)").GetComponent <CriAtomSource>(); _blockSE = GetComponent <CriAtomSource>(); _gameController = GameObject.Find("GameController").GetComponent <Gamecontroller>(); _flagManager = GameObject.Find("FlagManager").GetComponent <FlagManager>(); }
// Start is called before the first frame update void Start() { _rb2d = GetComponent <Rigidbody2D>(); playerMove = GetComponent <PlayerMove>(); _jumpSE = GetComponent <CriAtomSource>(); gameController = GameObject.Find("GameController").GetComponent <Gamecontroller>(); flagManager = GameObject.Find("FlagManager").GetComponent <FlagManager>(); }
void GameStart() { if (!tmp[stage]) { tmp[stage] = Instantiate(game[stage]); gc = GameObject.Find("Game0(Clone)").GetComponentInChildren <Gamecontroller>(); } }
void OnTriggerEnter2D(Collider2D other) { if (other.tag == "Bullet") { Destroy(gameObject); //ลบตัวเอง Gamecontroller.Addscore(scorevalue); } }
private void Start() { _pushSE = GameObject.Find("SE_item(CriAtomSource)").GetComponent <CriAtomSource>(); _gameController = GameObject.Find("GameController").GetComponent <Gamecontroller>(); _pos = transform.position; _eject = false; }
private void Start() { canvas2 = GameObject.FindGameObjectWithTag("CanvasS"); Jo = 0; JOP = GetComponent <Gamecontroller>(); // NUMERO = 1; Cancel = true; }
void Start() { GameContrl = GameObject.FindWithTag("EditorOnly").GetComponent <Gamecontroller>(); _time = 3.03f; _anim = transform.GetComponent <Animator>(); _anim.enabled = false; _giveWaterToNext = false; StartWatering(); }
private void Update() { if ((gameObject.transform.position.x - Gamecontroller.PlayerTransform.position.x < 30) && !IsFollow) {//alem de iniciar a perseguição ao heroi também toca uma udio próprio Gamecontroller.PlaySFX(Gamecontroller.SfxBossAwake); IsFollow = true; Gamecontroller.BossBar.SetActive(true);//ativa a barra de vida especial de chefe } }
void Start() { control = GetComponent <Gamecontroller>(); inventoryPanelRef = Resources.Load <GameObject> ("Prefab/main_inv"); inventorySlot = Resources.Load <GameObject> ("Prefab/Slot"); inventoryItem = Resources.Load <GameObject> ("Prefab/Item"); itemDatabase = GetComponent <ItemDatabase>(); inventoryData = JsonMapper.ToObject(File.ReadAllText(Application.dataPath + "/StreamingAssets/Inventorys.json")); ConstructInventoryDatabase(); }
public void EnemyAtack() {//controle do ataque d inimigo if ((Gamecontroller.PlayerTransform.position.x - transform.position.x <= 5 && !IsLookLeft) || (transform.position.x - Gamecontroller.PlayerTransform.position.x <= 5 && IsLookLeft)) { Gamecontroller.PlaySFX(Gamecontroller.SfxAtack); NpcAnimator.SetTrigger("Atack"); CanAtack = false; } }
void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(this.gameObject); } }
// Use this for initialization void Start() { hotSpotDatabase = GameObject.FindGameObjectWithTag("GameController").GetComponent <HotspotDatabase> (); itemDatabase = GameObject.FindGameObjectWithTag("GameController").GetComponent <ItemDatabase> (); inv = GameObject.FindGameObjectWithTag("GameController").GetComponent <InventoryDatabase> (); controll = GameObject.FindGameObjectWithTag("GameController").GetComponent <Gamecontroller>(); hotspot = hotSpotDatabase.FetchHotspotBySlug(this.gameObject.name); hotspotName = hotspot.Title; inventorySlot = Resources.Load <GameObject> ("Prefab/Slot"); inventoryItem = Resources.Load <GameObject> ("Prefab/Item"); }
// Use this for initialization void Start() { agent = GameObject.FindGameObjectWithTag("Player").GetComponent <NavMeshAgent>(); parentHotspotData = GetComponent <HotspotData>(); controll = GameObject.FindGameObjectWithTag("GameController").GetComponent <Gamecontroller>(); database = GameObject.FindGameObjectWithTag("GameController").GetComponent <EventandTalkDatabase>(); eventTalk = database.FetchEventTalkBySlug(parentHotspotData.hotspot.Slug); GameObject objFlowchart = GameObject.Find(eventTalk.Flowchart); flowchart = objFlowchart.GetComponent <Flowchart>(); }
public void OnMouseDown() { GameObject copLights = GameObject.Find("GameController"); Gamecontroller targetScript = copLights.GetComponent <Gamecontroller>(); targetScript.green += 1; timer -= Time.deltaTime; ScoreG(); AudioSource.PlayClipAtPoint(clip, transform.position); Destroy(gameObject); }
private void Awake() { if (instance == null) { instance = this; } else { Destroy(this); } }
public void OnMouseDown() { GameObject copLights = GameObject.Find("GameController"); Gamecontroller targetScript = copLights.GetComponent <Gamecontroller>(); targetScript.blue += 1; targetScript.timer += bonustime; targetScript.destroyBox = true; Score(); AudioSource.PlayClipAtPoint(clip, transform.position); Destroy(gameObject); }
// Start is called before the first frame update void Start() { player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMove>(); gameController = GameObject.Find("GameController").GetComponent <Gamecontroller>(); capsuleCollider = GetComponent <CapsuleCollider2D>(); gearColider = thisGear.gear.GetComponent <PolygonCollider2D>(); handParent = transform.parent.gameObject; distinationPos = new Vector2(Random.Range(moveRangeX.x, moveRangeX.y), Random.Range(moveRangeY.x, moveRangeY.y)); pattern = Pattern.RandomWalk; startPos = handParent.transform.position; }
// Use this for initialization void Start() { gc = GameObject.FindObjectOfType <Gamecontroller>(); rb = GetComponent <Rigidbody2D>(); // rb.AddForce(Vector2.down * Speed*Time.deltaTime); rb.velocity = Dir * Speed; Vector3 tmp = Camera.main.ScreenToWorldPoint(new Vector3(0, 0, 0)); minY = tmp.y; }
// Start is called before the first frame update void Start() { source = GetComponent <CriAtomSource>(); playerMove = GameObject.Find("Gururin").GetComponent <PlayerMove>(); gameController = GameObject.Find("GameController").GetComponent <Gamecontroller>(); flagManager = GameObject.Find("FlagManager").GetComponent <FlagManager>(); _gururinRb2d = GameObject.Find("Gururin").GetComponent <Rigidbody2D>(); _gpQuaternion = gearPos.transform.rotation; moveGear[0] = true; }
// Start is called before the first frame update void Start() { gameController = GameObject.Find("GameController").GetComponent <Gamecontroller>(); if (speed == false) { _rotSpeed = gearGimmick.rotSpeed / 100.0f; } else { _rotSpeed = gearGimmick.rotSpeed / -100.0f; } }
// Use this for initialization void Awake() { SceneManager.sceneLoaded += OnSceneLoaded; if (control == null) { DontDestroyOnLoad(gameObject); control = this; } else if (control != this) { Destroy(gameObject); } }
void Start() { GameObject gameControllerObject = GameObject.FindWithTag("GameController"); if (gameControllerObject != null) { gameController = gameControllerObject.GetComponent <Gamecontroller>(); } if (gameController == null) { Debug.Log("Cannot find 'GameController' script"); } }
private void Start() { GameObject gameControllerObject = GameObject.FindWithTag("GameController"); if (gameControllerObject != null) { gameController = gameControllerObject.GetComponent <Gamecontroller>(); } if (gameController == null) { Debug.Log("Nicht da 'Gamecontroller'"); } }