Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class Fumiko : MonoBehaviour {
- public float upforce = 200f;
- private bool isDead; = false;
- private Rigidbody2D rb2d;
- // Use this for initialization
- void Start ()
- {
- rb2d = GetComponent<Rigidbody2D> ();
- }
- // Update is called once per frame
- void Update ()
- {
- if (isDead == false)
- {
- if (Input.GetMouseButtonDown (0))
- {
- rb2d.velocity = Vector2.zero;
- rb2d.AddForce(new Vector2(0, upforce));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement