private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag == "Block") { pushing = true; Debug.Log("yes"); } if (collision.gameObject.tag == "SnowPile") { shoot.numSnow = 3; } if (collision.gameObject.tag == "Checkpoint") { //checkpoint = other.gameObject; checkpoint check = collision.gameObject.GetComponent <checkpoint>(); check.playerHit = true; pointX = check.x; pointY = check.y; pointZ = check.z; float positionX = pointX; float positionY = pointY; float positionZ = pointZ; PlayerPrefs.SetFloat("CheckPointX", positionX); PlayerPrefs.SetFloat("CheckPointY", positionY); PlayerPrefs.SetFloat("CheckPointZ", positionZ); //dog.transform.position = collision.transform.position; /*CheckPoints check = other.transform.GetComponent<CheckPoints>(); * check.Save();*/ } }
public void Reset_reward() { current_ad = null; current_quantity_reward_selected = 0; current_item_id_reward_selected = -1; target_checkpoint = null; buy_button_cost = 0; }
// Use this for initialization void Start () { isActivePt = this; psxu= GameObject.FindGameObjectWithTag (Tags.player).GetComponent<PlayerStatus> (); // isActivePt = firstPt; }