Aetheria/Assets/Scripts/ServerShared/OrbitalEntity.cs
Reinier Vens b6828a975a Save/Load and Main Menu Submenus
Redid all of the property panel UI prefabs (oof)
Implemented saving and loading of the game state
Moved sector generation to sector constructor (along with loading from save file)
Entity settings now separate from player settings
Player settings (incl. saved run) now statically accessible from game manager
Added animations and submenus to the main menu
Unified main menu settings and properties panel styles for prefab reusability
2021-03-14 03:56:49 +00:00

31 lines
929 B
C#

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
using System;
using System.Collections;
using System.Collections.Generic;
using Unity.Mathematics;
using static Unity.Mathematics.math;
using float2 = Unity.Mathematics.float2;
public class OrbitalEntity : Entity
{
public Guid OrbitData;
public OrbitalEntity(ItemManager itemManager, Zone zone, EquippableItem hull, Guid orbit, EntitySettings settings) : base(itemManager, zone, hull, settings)
{
OrbitData = orbit;
}
public override void Update(float delta)
{
if (OrbitData != Guid.Empty)
{
Position.xz = Zone.GetOrbitPosition(OrbitData);
Velocity = Zone.GetOrbitVelocity(OrbitData);
}
base.Update(delta);
}
}