//protected bool something; // Start is called before the first frame update void Start() { joystick = FindObjectOfType <Joystick>(); joybutton = FindObjectOfType <Joybutton>(); rigidbody = GetComponent <Rigidbody>(); outline.enabled = false; }
// Use this for initialization void Start() { if (!(Application.platform == RuntimePlatform.WindowsPlayer || Application.platform == RuntimePlatform.LinuxPlayer || Application.platform == RuntimePlatform.WindowsEditor || Application.platform == RuntimePlatform.LinuxEditor)) { joystick = FindObjectOfType <Joystick> (); buttonFireball = GameObject.FindWithTag("Fireball").GetComponent <Joybutton>(); buttonDash = GameObject.FindWithTag("Dash").GetComponent <Joybutton>(); buttonSpecial = GameObject.FindWithTag("Special").GetComponent <Joybutton>(); buttonFireball.setCooldown(fireballCooldown); buttonDash.setCooldown(dashCooldown); } canFire = true; canDash = true; canSpecial = true; cameraOffset = new Vector3(0f, 35f, -25f); spellSpawnPoint = this.transform.GetChild(1); playerHealth = GetComponent <PlayerHealth> (); playerRigidBody = GetComponent <Rigidbody>(); mainCamera = Camera.main.transform; playerHealthBar = this.transform.Find("Healthbar"); playerHealthBar.rotation = mainCamera.transform.rotation; }
Animator Anim; // chamando Animator // Start is called before the first frame update void Start() { joybutton = FindObjectOfType <Joybutton>(); audioS = gameObject.GetComponent <AudioSource>(); Anim = GetComponent <Animator>(); }
void OnEnable() { runSpeed = character.RunSpeed; controller = this.gameObject.GetComponent <CharacterController2D>(); controller.OnLandEvent = new UnityEvent(); controller.OnLandEvent.AddListener(OnLanding); controller.OnCrouchEvent = new BoolEvent(); controller.OnCrouchEvent.AddListener(OnCrouching); controller.m_JumpForce = character.JumpForce; animator = this.gameObject.GetComponent <Animator>(); character.GameHandler = GameObject.FindObjectOfType <GameHandler>(); Hit_Controller hit_Controller = character.Bullet.GetComponent <Hit_Controller>(); hit_Controller.Move1 = new ObjectEvent(); hit_Controller.Move1.AddListener(character.Move1); hit_Controller.Move2 = new ObjectEvent(); hit_Controller.Move2.AddListener(character.Move2); hit_Controller.Move3 = new ObjectEvent(); hit_Controller.Move3.AddListener(character.Move3); hit_Controller.OnMoveFinished = new UnityEvent(); hit_Controller.OnMoveFinished.AddListener(OnMoveFinished); joystick = FindObjectOfType <Joystick>(); move1 = GameObject.FindWithTag("move1").GetComponent <Joybutton>(); move2 = GameObject.FindWithTag("move2").GetComponent <Joybutton>(); finalMove = GameObject.FindWithTag("finalMove").GetComponent <Joybutton>(); }
void Awake() { joystick = FindObjectOfType <Joystick>(); joybutton = FindObjectOfType <Joybutton>(); target = GetComponentInParent <Target>(); }
public void PlayerSetting() { joystick = FindObjectOfType <Joystick>(); joybutton = FindObjectOfType <Joybutton>(); animator = GetComponent <Animator>(); rigidbody = GetComponent <Rigidbody>(); navAgent = GetComponent <NavMeshAgent>(); navAgent.stoppingDistance = 0.7f; isDead = false; if (gameObject.transform.parent != null) { playerHpBar = gameObject.transform.parent.transform.Find("Canvas").GetComponent <PlayerHpBar>(); } playerTargeting = GetComponent <PlayerTargeting>(); characterBase = GameManager.Instance.characterInfoList[GameManager.Instance.playerData.characterNumber]; navAgent.speed = characterBase.speed; animator.SetFloat("AtkSpeed", characterBase.atkSpeed); }
void Start() { joystick = FindObjectOfType <Joystick>(); //To defined the type of joystick joybutton = FindObjectOfType <Joybutton>(); //To defined the type of joybutton restartPoint = transform.position; rb = GetComponent <Rigidbody>(); }
private void Start() { _charC = GetComponent <CharacterController>(); // Joystick joystick = FindObjectOfType <MasterJoystick>(); joybutton = FindObjectOfType <Joybutton>(); }
// Start is called before the first frame update void Start() { //theRB = GetComponent<Rigidbody>(); controller = GetComponent <CharacterController>(); joystick = FindObjectOfType <Joystick>(); joybutton = FindObjectOfType <Joybutton>(); }
void Start() { vect = new Vector3(); fre = GetComponent <AudioSource>(); joystick = FindObjectOfType <Joystick>(); joybutton = FindObjectOfType <Joybutton>(); }
private void SetUpData_LOCAL_NONLOCAL() { if (photonView.IsMine) { PlayerCamera.transform.SetParent(null, false); cameraController = PlayerCamera.GetComponent <PlayerCameraController>(); cameraController.m_XOffset = cameraOffset; _object = GetComponent <GeneralController>(); moveStick = FindObjectOfType <MoveStick>(); attackStick = FindObjectOfType <AttackStick>(); specialStick = FindObjectOfType <SpecialStick>(); jumpButton = FindObjectOfType <Joybutton>(); SpecialCanvas = GameObject.Find("Canvas - Special"); SpecialMeterCanvas = GameObject.Find("Canvas - SpecialMeter"); specialMeter = GameObject.Find("Special Meter").GetComponent <Image>(); SpecialCanvas.SetActive(false); PlayerNameText.text = PhotonNetwork.LocalPlayer.NickName; PlayerNameText.color = Color.green; } else { PlayerCamera.SetActive(false); PlayerNameText.text = photonView.Owner.NickName; PlayerNameText.color = Color.red; } }
// Use this for initialization void Start() { joystick = FindObjectOfType <Joystick>(); joybutton = FindObjectOfType <Joybutton>(); moveSpeed = 10f; animPlayer = GetComponent <Animator>(); }
// Start is called before the first frame update void Start() { joybutton = FindObjectOfType <Joybutton>(); defaultRotationAngle = transform.localEulerAngles.y; currentRotationAngle = transform.localEulerAngles.y; }
void Start() { player = GameObject.FindGameObjectWithTag("Player").transform; playerAnim = player.GetComponent <Animator>(); transitionAnim = GameObject.Find("Transition").GetComponent <Animator>(); upButton = GameObject.Find("Up").GetComponent <Joybutton>(); }
// Start is called before the first frame update void Start() { corpo = GetComponent <Rigidbody2D>(); joystick = FindObjectOfType <Joystick>(); joybutton = FindObjectOfType <Joybutton>(); }
private void Awake() { fadeManager = GameObject.FindGameObjectWithTag("FadeCanvas").GetComponent <FadeManager>(); nowPlayer = GameObject.FindGameObjectWithTag("Player"); joystick = FindObjectOfType <Joystick>(); joybutton = FindObjectOfType <Joybutton>(); }
// Start is called before the first frame update void Start() { transform.position = option1.position; joystick = FindObjectOfType<Joystick>(); joystick.AxisOptions = AxisOptions.Vertical; joybutton = FindObjectOfType<Joybutton>(); }
// Start is called before the first frame update void Start() { joystick = FindObjectOfType <Joystick>(); joybutton = FindObjectOfType <Joybutton>(); initial_pos = transform.position; collision = LayerMask.GetMask("Obstacles"); rigidbody = GetComponent <Rigidbody>(); }
void Start() { myRB = GetComponent <Rigidbody2D>(); myRenderer = GetComponent <SpriteRenderer>(); myAnimator = GetComponent <Animator>(); joystick = FindObjectOfType <Joystick>(); joybutton = FindObjectOfType <Joybutton>(); }
void Start() { verc = new Vector3(); souric = GetComponent <AudioSource>(); liftext.text = "LIFE: " + life; joybuttonik = FindObjectOfType <Joybutton>(); joystickim = FindObjectOfType <Joystick>(); }
void Start() { vect = new Vector3(); sorchi = GetComponent <AudioSource>(); textLfe.text = "LIFE: " + life; joybuttoni = FindObjectOfType <Joybutton>(); joysticki = FindObjectOfType <Joystick>(); }
void Start() { //Find Joysticks joybutton = FindObjectOfType <Joybutton>(); //Get Components ControllerPlayer = GetComponent <CharacterController>(); anim = GetComponent <Animator>(); }
void Start() { joybutton = FindObjectOfType <Joybutton>(); an = GetComponent <Animator>(); rb = GetComponent <Rigidbody2D>(); pos = GameObject.FindGameObjectWithTag("Respawn"); canv = GameObject.Find("Canvas"); InvokeRepeating("spawn", 6f, 15f); }
// Start is called before the first frame update void Start() { joystick = FindObjectOfType <Joystick>(); joystickPtr = FindObjectOfType <JoystickPointer>(); attack = FindObjectOfType <Attack>(); joybutton = FindObjectOfType <Joybutton>(); anim = GetComponent <Animator>(); rigidbody = GetComponent <Rigidbody>(); }
internal override void Init() { currentDirection = Direction.Up; isDefend = true; defendTime = 3.0f; role = Role.Player; _joystick = FindObjectOfType <Joystick>(); _joystick.AxisOptions = AxisOptions.Both; _joybutton = FindObjectOfType <Joybutton>(); }
private void Awake() { joystick = FindObjectOfType <Joystick>(); joybutton = FindObjectOfType <Joybutton>(); _objectCollider = GetComponent <BoxCollider2D>(); _objectCollider.isTrigger = true; players = GameObject.FindGameObjectsWithTag("Player"); }
// Use this for initialization void Start() { joystick = FindObjectOfType <Joystick>(); joybutton = FindObjectOfType <Joybutton>(); joybutton2 = FindObjectOfType <Joybutton2>(); bsalir = FindObjectOfType <Salir>(); anim = GetComponent <Animator>(); anime = enemigo.GetComponent <Animator>(); }
// Use this for initialization void Start() { joystick = FindObjectOfType <Joystick>(); joybutton = FindObjectOfType <Joybutton>(); rb = GetComponent <Rigidbody>(); lastPlayerDirection = new Vector3(joystick.Horizontal * velocityFactor, rb.velocity.y, joystick.Vertical * velocityFactor); animator = gameObject.GetComponent <Animator>(); }
void Start() { joystick = FindObjectOfType <Joystick>(); joybutton = FindObjectOfType <Joybutton>(); anim = GetComponent <Animator>(); isWalking = false; renderer = GetComponent <SpriteRenderer>(); colisorAtaque.SetActive(false); gato = 0; npc = GameObject.Find("alexia"); }
protected override void Awake() { base.Awake(); carryButton = GameObject.FindWithTag("Carry Button").GetComponent <Joybutton>(); carryButton.ButtonDownEvent += HandleCarryBySearch; inventory = GetComponent <Inventory>(); storeButton = GameObject.FindWithTag("Store Button").GetComponent <Joybutton>(); storeButton.ButtonDownEvent += inventory.SmartToggle; }