示例#1
0
文件: Pusher2.cs 项目: wbshim/Buggy
 // Use this for initialization
 void Start()
 {
     shoveTime    = Time.time;
     tapStartTime = Time.time;
     controller   = GetComponent <CharacterController>();
     pushbar      = Buggy.GetComponentInChildren <Pushbar>();
 }
示例#2
0
    // Use this for initialization
    void Start()
    {
        rb           = GetComponent <Rigidbody>();
        pushbar      = buggy.GetComponentInChildren <Pushbar>();
        speed        = 0;
        tapStartTime = Time.time;
        RaycastHit hit;

        if (Physics.Raycast(transform.position, Vector3.down, out hit, 3))
        {
            incline = Quaternion.AngleAxis(90, transform.right) * hit.normal;
            Debug.DrawRay(transform.position, incline * 5, Color.red);
        }
    }
示例#3
0
 // Use this for initialization
 void Start()
 {
     cam           = Camera.main;
     targetPushbar = TargetBuggy.pushbar;
 }
示例#4
0
文件: Pusher3.cs 项目: wbshim/Buggy
 public void SetPushbar(Pushbar _pushbar)
 {
     pushbar = _pushbar;
 }