void Start() { unlocks = GlobalController.save.unlocks; rb2d = GetComponent<Rigidbody2D>(); anim = GetComponent<Animator>(); options = GlobalController.save.options; this.facingRight = false; cyanMaterial = Resources.Load<Material>("Shaders/CyanFlash"); spr = GetComponent<SpriteRenderer>(); defaultMaterial = GetComponent<SpriteRenderer>().material; gunEyes = transform.Find("GunEyes").transform; gun = GetComponentInChildren<Gun>(); interaction = GetComponentInChildren<InteractAppendage>(); lastSafeOffset = this.transform.position; speedLimiter = GetComponent<SpeedLimiter>(); spriteRenderers = new List<SpriteRenderer>(GetComponentsInChildren<SpriteRenderer>(includeInactive:true)); combatActives = GetComponentsInChildren<ActiveInCombat>(includeInactive:true); diamondShine = Resources.Load("Effects/DiamondShine") as GameObject; airAttackTracker = GetComponent<AirAttackTracker>(); RefreshAirMovement(); deathEvent = Resources.Load("ScriptableObjects/Events/Player Death") as GameEvent; groundCheck = GetComponent<PlayerGroundCheck>(); groundData = groundCheck.groundData; LoadFromSaveData(GlobalController.save); EnableTriggers(); }
void Awake() { groundCheck = transform.GetComponent <PlayerGroundCheck>(); inventory = transform.GetComponent <ItemInventory>(); inputScript = transform.GetComponent <InputScript>(); rigidbody = transform.GetComponent <Rigidbody2D>(); topCollider = transform.GetComponent <BoxCollider2D>(); spriteAnimator = transform.GetComponent <SpriteAnimator>(); }
void Start() { box = GetComponent <BoxCollider2D>(); rb = GetComponent <Rigidbody2D>(); layerMask = 1 << LayerMask.NameToLayer(Layers.Ground); player = GetComponent <PlayerController>(); groundCheck = GetComponent <PlayerGroundCheck>(); }
private void Start() { rigidBody2D = GetComponent <Rigidbody2D>(); playerGroundCheck = GetComponent <PlayerGroundCheck>(); currentSpeed = normalMoveSpeed; PlayerStatContainer.Instance.inventoryOpenTrigger += () => { bool isInventoryOpen = PlayerStatContainer.Instance.isInventoryOpen; canPlayerMove = !isInventoryOpen; canPlayerJump = !isInventoryOpen; }; }
void Awake() { groundCheck = transform.GetComponent<PlayerGroundCheck>(); inventory = transform.GetComponent<ItemInventory>(); inputScript = transform.GetComponent<InputScript>(); rigidbody = transform.GetComponent<Rigidbody2D>(); topCollider = transform.GetComponent<BoxCollider2D>(); spriteAnimator = transform.GetComponent<SpriteAnimator>(); }
// Use this for initialization void Start() { anim = GetComponent <Animator>(); rb = GetComponent <Rigidbody2D>(); playerGroundCheck = GetComponent <PlayerGroundCheck>(); }
// Start is called before the first frame update void Start() { rb = GetComponent <Rigidbody>(); playerGroundCheck = GetComponentInChildren <PlayerGroundCheck>(); }
// Use this for initialization void Start() { rb = GetComponent <Rigidbody2D>(); playerGroundCheck = GetComponent <PlayerGroundCheck>(); }
public void Awake() { rb = GetComponent <Rigidbody2D>(); fistAttack = GetComponent <FistAttack>(); groundChecker = GetComponentInChildren <PlayerGroundCheck>(); }
// Use this for initialization void Awake() { pm = this.gameObject.GetComponent <PlayerMovement>(); gc = this.gameObject.GetComponent <PlayerGroundCheck>(); spriteAnimator = this.gameObject.GetComponent <SpriteAnimator>(); }
// Use this for initialization void Awake() { pm = this.gameObject.GetComponent<PlayerMovement>(); gc = this.gameObject.GetComponent<PlayerGroundCheck>(); spriteAnimator = this.gameObject.GetComponent<SpriteAnimator>(); }