// Use this for initialization void Start() { line = GetComponent <LineRenderer> (); hookShot = player.GetComponent <HookShot> (); cam = Camera.GetComponent <Camera> (); offset = transform.position - player.transform.position; }
private Vector3 startPos; //座標ズレ対策のlocalTransform; // Start is called before the first frame update void Start() { camera = Camera.main; playerManager = playerManageObj.GetComponent <PlayerManager>(); jumpBlock = playerRotateAxis.GetComponent <JumpBlock>(); hookShot = attackSoumen.GetComponent <HookShot>(); startPos = transform.localPosition; }
void Start() { speed = Initialspeed; rb = GetComponent <Rigidbody>(); count = 0; hookScript = hook.GetComponent <HookShot> (); rb.collisionDetectionMode = CollisionDetectionMode.ContinuousDynamic; }
public GrapplingHook(EntityPrototype proto, Player owner, Vector2 direction, Vector2 offset, HookShot gadget) : base(proto) { this.direction = direction; this.owner = owner; this.gadget = gadget; ownerOffset = offset; Body.mIgnoresOneWay = true; mMovingSpeed = 750; Body.mIgnoresGravity = proto.ignoreGravity; }
void Start() { speed = Initialspeed; imgCol = teleportFlash.color; rb = GetComponent <Rigidbody>(); count = 0; hookScript = hook.GetComponent <HookShot> (); rb.collisionDetectionMode = CollisionDetectionMode.ContinuousDynamic; rb.useGravity = true; }
// Use this for initialization void Start() { parentt = GetComponentInParent <HookShot>(); line = GetComponent <LineRenderer> (); hookShot = player.GetComponent <HookShot> (); cam = Camera.GetComponent <Camera> (); //offset = transform.position-player.transform.position ; //offset = transform.position-GetComponentInParent<Transform>().position ; offset = transform.position; }
void OnTriggerEnter(Collider col) { if (col.CompareTag("Player")) { HookShot hook = col.GetComponent <HookShot> (); if (hook != null) { hook.FreeGrapple(); } col.transform.position = spawnPoint.position; } }
void OnTriggerEnter(Collider other) { if (other.CompareTag("Player")) { if (!used) { playSound(); print("pu"); HookShot pHook = GameObject.Find("hookParent").GetComponent <HookShot>(); pHook.hookSpeeds += 0.5f; GameObject.Find("feedDisplay").GetComponent <feedDisplayScript>().display("Hook eject speed upgraded"); used = true; Destroy(this.gameObject); } } }