Пример #1
0
 public void RemoveHighlight()
 {
     if (!controller.Occupied)
     {
         NativeEntity.SetSlotMaterial(slotInteractionPlate, AssetLibrary.Materials.GreyMin);
     }
 }
Пример #2
0
//        GameObject core;

        public override void OnInitialize()
        {
            base.OnInitialize();

            Health = new Health();
            NativeEntity.LoadGeometry(0, AssetLibrary.Meshes.BasePlate);
            NativeEntity.SetMaterial(AssetLibrary.Materials.BasePlate);

            NativeEntity.LoadGeometry(1, AssetLibrary.Meshes.Diamond);
            NativeEntity.SetSlotMaterial(1, AssetLibrary.Materials.BaseCore);
            NativeEntity.SetSlotLocalTM(1, Matrix34.Create(Vec3.One, Quat.Identity, new Vec3(0, 0, 2f)));
        }
Пример #3
0
        public override void OnInitialize()
        {
            var physParams = new SEntityPhysicalizeParams()
            {
                mass    = -1,
                density = -1,
                type    = (int)EPhysicalizationType.ePT_Rigid,
            };

            // Create the mesh that responds to mouse interaction
            NativeEntity.LoadGeometry(slotInteractionPlate, AssetLibrary.Meshes.Hexagon);
            NativeEntity.SetSlotMaterial(slotInteractionPlate, AssetLibrary.Materials.GreyMin);

            // Create the BasePlate that represents the Construction Point.
            NativeEntity.LoadGeometry(slotBasePlate, AssetLibrary.Meshes.BasePlate);
            NativeEntity.SetSlotMaterial(slotBasePlate, AssetLibrary.Materials.BasePlate);

            NativeEntity.Physicalize(physParams);
        }
Пример #4
0
 void Controller_OnUnitRemoved(Unit unit)
 {
     NativeEntity.SetSlotMaterial(slotInteractionPlate, AssetLibrary.Materials.GreyMin);
 }
Пример #5
0
        void Controller_OnOccupiedStateChanged()
        {
            var material = controller.Occupied ? AssetLibrary.Materials.Green : AssetLibrary.Materials.GreyMin;

            NativeEntity.SetSlotMaterial(slotInteractionPlate, material);
        }