-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBaseModule.cs
More file actions
37 lines (30 loc) · 844 Bytes
/
BaseModule.cs
File metadata and controls
37 lines (30 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using UnityEngine;
using System;
using System.Linq;
using System.Collections.Generic;
namespace BetterTogether
{
public class BaseModule : PartModule
{
public static List<BaseModule> Bases=new List<BaseModule>();
public int counter=0;
// public string Owner; the owner of the base
public Vector3d MapPosition;
public override void OnUpdate ()
{
if (MapView.MapIsEnabled && counter == 0)
{
gameObject.AddComponent<Hex> ();
counter++;
// MapPosition = ScaledSpace.LocalToScaledSpace(vessel.GetWorldPos3D());
// if (!Bases.Contains(this))
// Bases.Add(this);
}
}
/* public override void OnUpdate()
{
if (vessel.Landed == true && (ScaledSpace.LocalToScaledSpace(vessel.GetWorldPos3D()) != MapPosition))
MapPosition = ScaledSpace.LocalToScaledSpace(vessel.GetWorldPos3D());
}*/
}
}