本文整理汇总了C#中Money.createMoney方法的典型用法代码示例。如果您正苦于以下问题:C# Money.createMoney方法的具体用法?C# Money.createMoney怎么用?C# Money.createMoney使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Money
的用法示例。
在下文中一共展示了Money.createMoney方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: VerticalCollisions
void VerticalCollisions(ref Vector3 velocity) { //проверка RayCasta по y
float directionY = Mathf.Sign (velocity.y); //если число с минусом то 0, если с + то 1
float rayLenght = Mathf.Abs(velocity.y) + skinWidth; //убираем знак
for (int i = 0; i< verticalRayCount; i++) { //рисуем четыре линии
Vector2 rayOrigin = (directionY == -1)?raycastOrigins.bottomLeft:raycastOrigins.topLeft; //присваиваем значение в зависимости от знака
rayOrigin += Vector2.right * (verticalRaySpacing * i + velocity.x);
RaycastHit2D hit = Physics2D.Raycast(rayOrigin, Vector2.up * directionY, rayLenght, collisionMask); //пускаем луч для проверки с колизией слоя
Debug.DrawRay(rayOrigin, Vector2.up * directionY * rayLenght, Color.red); //выводи луч
if (hit) {
if (hit.collider.tag == "Through") {
if (directionY == 1 || hit.distance == 0) {
soundSC.track("prize");
money = money.GetComponent<Money>();
money.createMoney (rayOrigin);
}
if (collisions.fallingThroughPlatform) {
}
if (playerInput.y == -1) {
}
}
velocity.y = (hit.distance - skinWidth) * directionY;
rayLenght = hit.distance;
collisions.below = directionY == -1;
collisions.above = directionY == 1;
}
}
}