// Use this for initialization void Start() { Cursor.visible = false; textSizeTimer = 0.0f; textMoveAmount1 = 10.0f; textMoveAmount2 = 10.0f; thePlayer = FindObjectOfType <playerMove> (); AREquipped = true; MLEquipped = false; squareWorld.SetActive(true); circleWorld.SetActive(false); squareBackground.SetActive(true); circleBackground.SetActive(false); squareWorldActive = true; canShootCuzNotInCutscene = true; playerHasMG = true; // playerCanSwitchWorlds = true; playerGotWeaponAdvice = false; weaponText1.SetActive(false); weaponText2.SetActive(false); }
float z = -1f; // Z height to draw line #endregion Fields #region Methods void Awake() { standardForce = transform.right * forceMult; force = transform.right * forceMult; player = GetComponent<playerMove>(); inv = GetComponent<Inventory>(); }
// Start is called before the first frame update void Start() { player = GameObject.Find("Player"); script = player.GetComponent <playerMove>(); x = script.x; y = script.y; }
void Start() { player = this; //anime = transform.GetChild(1).GetComponent<Animator>(); anime1 = transform.GetComponent <Animator>(); start = end = spwanEnegry = false; //size = minSize; }
// Use this for initialization void Start() { thePlayer = FindObjectOfType <playerMove> (); spawnerPos = new Vector3(transform.position.x, transform.position.y, transform.position.z); }
void Awake() { anim = GetComponent <Animator> (); playerAudio = GetComponent <AudioSource> (); playerMovement = GetComponent <playerMove> (); playerShooting = GetComponentInChildren <playerShoot> (); currentHealth = startingHealth; }
void Start() { player = GameObject.FindGameObjectWithTag("Player"); playerMoveScript = player.GetComponent <playerMove> (); canADS = true; weaponHolderAnimator = GetComponent <Animator> (); armsAnimator = arms.GetComponent <Animator> (); defaultPos = transform.localPosition; }
void OnTriggerEnter2D(Collider2D other) { if(other.gameObject.tag == "Player") { buttonPrompt.SetActive(true); player = other.GetComponent<playerMove>(); if (repeatable) current = 0; } }
// public playerMove instance; // Start is called before the first frame update void Start() { player_Together = playerTogether.GetComponent <playerMove>(); join_Together = playerTogether.GetComponent <playerJoin>(); //전체모임이 선택되었을때, 플레이어를 예쁘게 모이게 해주는아이 // playerMove player_1 = GameObject.Find("Player_1").GetComponent<playerMove>(); // player_1 = GameObeject.Find("Player_1") }
// Use this for initialization void Start() { //get the spawn position so we know how to get home player = GameObject.FindGameObjectWithTag("Player"); playerHealth = player.GetComponent <playerMove>(); startPosition = transform.position; timer = shootDelay; target = player; }
// Use this for initialization void Start() { thePlayer = FindObjectOfType <playerMove> (); rb = GetComponent <Rigidbody2D>(); touchingGround = false; player = GameObject.Find("Player"); }
// Use this for initialization void Start() { theRigidBody = GetComponent <Rigidbody2D>(); pAim = GameObject.FindObjectOfType(typeof(playerAim)) as playerAim; animationController = ShotRenderer.GetComponent <Animator>(); hitbox = ShotRenderer.GetComponent <PolygonCollider2D>(); scoreText = GameObject.Find("scorep" + playerNumber).GetComponent <Text>(); smScript = SoundManager.GetComponent <soundManager>(); pMove = this.gameObject.GetComponent <playerMove>(); victoryCanvas.enabled = true; }
// Use this for initialization void Start() { playerData = GameObject.FindGameObjectsWithTag("backgroundScipt")[0].GetComponent <playerDataClass>(); // rigidbody2d = GetComponent <Rigidbody2D>(); npcclass = GetComponent <npcClass>(); playermove = GetComponent <playerMove>(); npcmove = GetComponent <npcMove>(); npcclass.npcClassSetUp(); ignoreCollisionSetUp();//無視其他enemy碰撞 thisAnimation.state.Complete += MyCompleteListener; DelegateSetUp(); }
// public void destroyBullet() // { // Destroy(gameObject); // } private void OnCollisionEnter2D(Collision2D collision) { enemyScript enemy = collision.collider.GetComponent <enemyScript>(); playerMove player = collision.collider.GetComponent <playerMove>(); if (player == null) { Destroy(gameObject); } if (enemy != null) { enemy.Hit(); } }
private void OnCollisionEnter(Collision collision) { if (collision.transform.tag == "impassible surroundings") { Destroy(gameObject); } else if (collision.transform.tag == "Player_with_ak") { Debug.Log("hit player"); playerMove player = collision.transform.GetComponent <playerMove>(); player.takeDamage(20f); Destroy(gameObject); } }
#pragma warning restore 414 void Awake( ) { #if !(UNITY_FLASH) useGUILayout = false; #endif ExposedVariables.Awake( ); ExposedVariables.SetParent(this.gameObject); if ("1.PLE" != uScript_MasterComponent.Version) { uScriptDebug.Log("The generated code is not compatible with your current uScript Runtime " + uScript_MasterComponent.Version, uScriptDebug.Type.Error); ExposedVariables = null; UnityEngine.Debug.Break(); } }
void Awake(){ _instance = this; movexu = this.GetComponent<playerMove> (); psxu = this.GetComponent<PlayerStatus> (); hudtextFollow= transform.Find ("HUDTextXu").gameObject; //主角控制器 controller = this.GetComponent<CharacterController> (); dir = this.GetComponent<PlayerDir> (); normal = body.renderer.material.color; foreach (GameObject go in effectxu) { skillIeffectDict.Add(go.name,go); } }
// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player"); skyboxCameraHolder = GameObject.FindGameObjectWithTag("skyboxViewer"); cameraHolder = GameObject.FindGameObjectWithTag("cameraHolder"); playerMove = player.GetComponent <playerMove>(); aimdownsights = weaponHolder.GetComponent <aimDownSights> (); healthcontroller = player.GetComponent <healthController> (); armsAnimator = arms.GetComponent <Animator>(); cameraAnimator = cameraHolder.GetComponent <Animator> (); skyboxCameraAnimator = skyboxCameraHolder.GetComponent <Animator> (); weaponAnimator = GetComponent <Animator> (); rounds = magSize; weaponAudio = GetComponent <AudioSource> (); }
private void OnTriggerEnter2D(Collider2D collision) { playerMove player = collision.GetComponent <playerMove>(); if (player != null) { FindObjectOfType <playerMove>().SendMessage("recolocar"); } enemyScript enemy = collision.GetComponent <enemyScript>(); if (enemy != null) { Destroy(enemy); } }
void Start() { if (isLocalPlayer) { gameObject.name = "ME"; } //當角色被產生出來時,如果不是Local Player就把所有的控制項目關閉,這些角色的位置資料將由Server來同步 if (!isLocalPlayer) { _playerMove = GetComponent <playerMove>(); if (_playerMove) { _playerMove.enabled = false; } } }
// Use this for initialization void Start() { // TODO optimisation property = GetComponent <Property>(); cards = Cards.cards; _turns = 1; this.transform.position = cards[0].transform.position; currentCardIndex = 0; GetComponent <Renderer>().material.color = color; if (hud == null) { hud = GameObject.Find("HUD").GetComponentInChildren <hudChange>(); } turn = transform.parent.GetComponent <Turn>(); move = this.GetComponent <playerMove>(); }
void OnTriggerEnter(Collider other) { playerMove m = other.GetComponent <playerMove>(); if (m != null && fuel > 0) { curr = m; InvokeRepeating("inputFuel", fuelRate, fuelRate); if (v != null) { v.RPC("startFuelFX", PhotonTargets.All, null); } else { startFuelFX(); } } }
// Use this for initialization void Start() { thePlayer = FindObjectOfType <playerMove> (); AREquipped = true; SGEquipped = false; HCEquipped = false; RLEquipped = false; MLEquipped = false; playerHasMeleeAttack = true; playerFacingLeft = false; playerFacingRight = true; meleeColliderRight.SetActive(false); meleeColliderLeft.SetActive(false); }
public void networkInit() { thisM.ChangeCam(thisCam); // thisCam.gameObject.SetActive (true); foreach (MonoBehaviour m in networkSet) { m.enabled = true; } Rigidbody r = GetComponent <Rigidbody>(); r.velocity = new Vector3(0, 0, 0); r.useGravity = true; playerMove pm = GetComponent <playerMove>(); pm.Start(); HPText = tileDictionary.thisM.HPText; HP = originalHealth; }
// Start is called before the first frame update void Start() { playerComponent = GetComponentInChildren <playerMove>(); gameMesh = this.GetComponent <Renderer>(); normalColor = gameMesh.material.color; damageColor = Color.white; mainMaterial = gameMesh.material; flashDelay = 0.025f; bottomLeft = Camera.main.ScreenToWorldPoint(new Vector3(0, 0, 100)); topRight = Camera.main.ScreenToWorldPoint(new Vector3(Camera.main.pixelWidth, Camera.main.pixelHeight, 100)); cameraRect = new Rect( bottomLeft.x, bottomLeft.y, topRight.x - bottomLeft.x, topRight.y - bottomLeft.y); }
private void OnCollisionEnter2D(Collision2D collision) { playerMove player = collision.collider.GetComponent <playerMove>(); if (player != null) { player.Hit(); } else { Vector3 collPosition = collision.transform.position; if (collPosition.x > transform.position.x) { walk = 1f; transform.localScale = new Vector3(-3.0f, 3.0f, 3.0f); } else { walk = -1f; transform.localScale = new Vector3(3.0f, 3.0f, 3.0f); } } }
// Update is called once per frame void Update() { move(); Vector3 mousePos = Input.mousePosition; Vector3 mouseWorld = Camera.main.ScreenToWorldPoint(new Vector3( mousePos.x, mousePos.z, mousePos.y)); ////Vector3 forward = mouseWorld - this.transform.position; ////this.transform.rotation = Quaternion.LookRotation(forward, Vector3.up); //transform.LookAt(mouseWorld); Vector3 screen_pos = Camera.main.WorldToScreenPoint(this.transform.position); float AngleRad = Mathf.Atan2(mousePos.y - screen_pos.y, mousePos.x - screen_pos.x) * Mathf.Rad2Deg; // Get Angle in Degrees //float AngleDeg = (180 / Mathf.PI) * AngleRad; // Rotate Object this.transform.rotation = Quaternion.Euler(0, 0, AngleRad - 90f); if (playerComponent == null) { playerComponent = GetComponentInChildren <playerMove>(); } }
// Use this for initialization void Start() { move = GetComponent <playerMove>(); }
void Awake() { animation = transform.Find("Prisoner").GetComponent <Animation>(); playermove = this.GetComponent <playerMove>(); }
// Use this for initialization void Start () { move = this.GetComponent<playerMove> (); attackxu = this.GetComponent<PlayerAttack> (); }
private void Awake() { plMove = GetComponentInParent <playerMove>(); }
// Use this for initialization void Start () { targetposition = transform.position; playMove = this.GetComponent<playerMove> (); plyattack = this.GetComponent<PlayerAttack> (); }
void Awake() { player = GetComponent<playerMove>(); }
protected void getPlayer() { player = GetComponentInParent<playerMove>(); }
// Start is called before the first frame update void Start() { thePlayer = FindObjectOfType <playerMove>(); }
// Use this for initialization void Start() { Move = FindObjectOfType <playerMove>(); map = FindObjectOfType <crafting_map>(); }
private void getPlayer() { player = GetComponentInParent<playerMove>(); }
private void Awake() { plMove = GameObject.Find("player").GetComponent <playerMove>(); }