31
Support / Re: Saving problems
« on: August 23, 2013, 09:18:16 am »
This is a known issue with version 2.1 of the toolkit camera, and is fixed in version 2.2. Unity will say that the scene isn't saved, but actually it has been.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
ScoreScript.Score += mole.Whacked ? 0 : 10;
using UnityEngine;
using System.Collections;
public class GameScript : MonoBehaviour
{
public tk2dCamera Cam;
public float moveX;
void Start ()
{
Debug.Log("HERET");
moveX = 0;
}
void Update ()
{
if(Input.GetKey(KeyCode.RightArrow) || Input.GetKey(KeyCode.D))
{
Debug.Log("HERE");
moveX += 20;
Vector3 pos = Cam.transform.position;
pos.x += moveX;
Cam.transform.position = pos;
}
}
}
BoxCollider collider;
if(_sprite.GetComponent<BoxCollider>() == null)
{
collider = _sprite.gameObject.AddComponent<BoxCollider>();
}
else
{
collider = _sprite.gameObject.GetComponent<BoxCollider>();
}
collider.center = new Vector3 (0, 0, 0);
collider.size = new Vector3(10,10,1);