示例#1
0
 void Start()
 {
     if (input == null)
     {
         input = gameObject.GetComponent <RaycastCharacterInput>();
     }
     if (input == null)
     {
         Debug.LogError("Float script does not have an input");
     }
     if (controller == null)
     {
         controller = gameObject.GetComponent <RaycastCharacterController>();
     }
     if (controller == null)
     {
         Debug.LogError("Float script not attached to a character");
     }
 }
示例#2
0
	void Start () {
		if (input == null) input = gameObject.GetComponent<RaycastCharacterInput>();
		if (input == null) Debug.LogError("Float script does not have an input");
		if (controller == null) controller = gameObject.GetComponent<RaycastCharacterController>();
		if (controller == null) Debug.LogError("Float script not attached to a character");
	}