C# Класс BallReset, goalBall

This script resets the ball to the proper position. It will put the ball infront of one of the players on the team who is going to get the ball. This could be due to a penalty or a goal.
Наследование: MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Ball GameObject
BlueSideCenter GameObject
BlueSideLeft GameObject
BlueSideRight GameObject
RedSideCenter GameObject
RedSideLeft GameObject
RedSideRight GameObject

Открытые методы

Метод Описание
Start ( ) : void

Used to initize variables

placeBallBSC ( ) : void

Places the ball at the location of the Blue Side Center ball spawn.

placeBallBSL ( ) : void

Places the ball at the location of the Blue Side Left ball spawn.

placeBallBSR ( ) : void

Places the ball at the location of the Blue Side Right ball spawn.

placeBallRSC ( ) : void

Places the ball at the location of the Red Side Center ball spawn.

placeBallRSL ( ) : void

Places the ball at the location of the Red Side Left ball spawn.

placeBallRSR ( ) : void

Places the ball at the location of the Red Side Right ball spawn.

resetToClosestPoint ( bool redTeamPositions ) : void

Places ball at the location it is closest to

Приватные методы

Метод Описание
StopBall ( ) : void

Stops the ball, getting rid of all of the velocity, both directional and rotational. Used to make sure the ball doesn't keep moving after it is moved.

Описание методов

Start() публичный Метод

Used to initize variables
public Start ( ) : void
Результат void

placeBallBSC() публичный Метод

Places the ball at the location of the Blue Side Center ball spawn.
public placeBallBSC ( ) : void
Результат void

placeBallBSL() публичный Метод

Places the ball at the location of the Blue Side Left ball spawn.
public placeBallBSL ( ) : void
Результат void

placeBallBSR() публичный Метод

Places the ball at the location of the Blue Side Right ball spawn.
public placeBallBSR ( ) : void
Результат void

placeBallRSC() публичный Метод

Places the ball at the location of the Red Side Center ball spawn.
public placeBallRSC ( ) : void
Результат void

placeBallRSL() публичный Метод

Places the ball at the location of the Red Side Left ball spawn.
public placeBallRSL ( ) : void
Результат void

placeBallRSR() публичный Метод

Places the ball at the location of the Red Side Right ball spawn.
public placeBallRSR ( ) : void
Результат void

resetToClosestPoint() публичный Метод

Places ball at the location it is closest to
public resetToClosestPoint ( bool redTeamPositions ) : void
redTeamPositions bool True if checking red positions, False if checking blue positions
Результат void

Описание свойств

Ball публичное свойство

public GameObject Ball
Результат GameObject

BlueSideCenter публичное свойство

public GameObject BlueSideCenter
Результат GameObject

BlueSideLeft публичное свойство

public GameObject BlueSideLeft
Результат GameObject

BlueSideRight публичное свойство

public GameObject BlueSideRight
Результат GameObject

RedSideCenter публичное свойство

public GameObject RedSideCenter
Результат GameObject

RedSideLeft публичное свойство

public GameObject RedSideLeft
Результат GameObject

RedSideRight публичное свойство

public GameObject RedSideRight
Результат GameObject