// Unity event functions section. void Awake() { lerpAnimations = GetComponent <LerpComponent>(); shootComponent = GetComponent <ShootingComponent>(); moveComponent = GetComponent <MovementComponent>(); moveComponent.MoveSpeed = baseSpeed; polyCollider = GetComponent <PolygonCollider2D>(); swapper = GetComponent <ColorSwapper>(); mainActions = new MainActions(); mainActions.Player.SetCallbacks(this); EventList.enemyDeath += Player_OnEnemyDeath; EventList.grubCollect += Player_OnGrubCollect; HelperMethods.playerTransform = transform; }
public static void ShowAll() { bool flag = false; WriteLine("(ID студента, Факультет, Группа, Имя, Фамилия, Успеваемость)"); for (int i = 0; i < ActualNumberOfStudents; i++) { if (journal[i] != null) { MainActions.ShowStudentInfo(journal[i]); flag = true; } } MainActions.NoExistMassege(flag, TypeOfPerson.Student, AmountOfPersons.Several); }
/// <summary> /// Change canvas cursor according to action sent from palette tool window /// </summary> /// <param name="action"></param> public void receiveCanvasAction(MainActions action) { // Change cursor to pointer when adding new objects if ( (action == MainActions.actionCircle) || (action == MainActions.actionFilledCircle) || (action == MainActions.actionLine) || (action == MainActions.actionRectangle) || (action == MainActions.actionFilledRectangle) ) { pbCanvas.Cursor = cursorPointer; } // Change cursor to color picker if picking colors else if (action == MainActions.actionDropper) { pbCanvas.Cursor = cursorPicker; } // Default cursor: arrow else { pbCanvas.Cursor = cursorArrow; } }