示例#1
0
 // Use this for initialization
 void Start()
 {
     rb            = this.GetComponent <Rigidbody>();
     offset        = (Camera.main.transform.position - transform.position);
     cc            = GameObject.Find("Canvas").GetComponent <canvasController>();
     resetPosition = (transform.position);
 }
示例#2
0
    // Start is called before the first frame update

    void Start()
    {
        Instance = this;
        move.GetComponent <Button>().onClick.AddListener(moveOnclick);
        attack.GetComponent <Button>().onClick.AddListener(attackOnclick);
        skill.GetComponent <Button>().onClick.AddListener(skillOnclick);
        item.GetComponent <Button>().onClick.AddListener(itemOnclick);
        end.GetComponent <Button>().onClick.AddListener(endOnclick);
        backToChar.GetComponent <Button>().onClick.AddListener(backToCharOnclick);

        skillYes.GetComponent <Button>().onClick.AddListener(useSkill);
        skillNo.GetComponent <Button>().onClick.AddListener(backToChoice);
    }