chrisgregan
11 years ago
8 changed files with 107 additions and 0 deletions
Binary file not shown.
@ -0,0 +1,42 @@
|
||||
using UnityEngine; |
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace Fungus |
||||
{ |
||||
[CommandInfo("Scripting", |
||||
"Set Active", |
||||
"Sets a game object to be active / inactive.")] |
||||
public class SetActive : Command |
||||
{ |
||||
public GameObject targetGameObject; |
||||
|
||||
public BooleanData activeState; |
||||
|
||||
public override void OnEnter() |
||||
{ |
||||
if (targetGameObject != null) |
||||
{ |
||||
targetGameObject.SetActive(activeState.Value); |
||||
} |
||||
|
||||
Continue(); |
||||
} |
||||
|
||||
public override string GetSummary() |
||||
{ |
||||
if (targetGameObject == null) |
||||
{ |
||||
return "Error: No game object selected"; |
||||
} |
||||
|
||||
return targetGameObject.name; |
||||
} |
||||
|
||||
public override Color GetButtonColor() |
||||
{ |
||||
return new Color32(235, 191, 217, 255); |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: dbd8c931f22994b9d90e2037fffaa770 |
||||
MonoImporter: |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
Binary file not shown.
@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 7dd153b86fca74c329ccf129422fdbe2 |
||||
NativeFormatImporter: |
||||
userData: |
@ -0,0 +1,5 @@
|
||||
fileFormatVersion: 2 |
||||
guid: bbfa0b731252a4b70ad8eaf428d86965 |
||||
folderAsset: yes |
||||
DefaultImporter: |
||||
userData: |
After Width: | Height: | Size: 24 KiB |
@ -0,0 +1,48 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 78bc8db714c3749cc8bd8c0b7e525b85 |
||||
TextureImporter: |
||||
fileIDToRecycleName: |
||||
21300000: Background |
||||
serializedVersion: 2 |
||||
mipmaps: |
||||
mipMapMode: 0 |
||||
enableMipMap: 0 |
||||
linearTexture: 0 |
||||
correctGamma: 0 |
||||
fadeOut: 0 |
||||
borderMipMap: 0 |
||||
mipMapFadeDistanceStart: 1 |
||||
mipMapFadeDistanceEnd: 3 |
||||
bumpmap: |
||||
convertToNormalMap: 0 |
||||
externalNormalMap: 0 |
||||
heightScale: .25 |
||||
normalMapFilter: 0 |
||||
isReadable: 0 |
||||
grayScaleToAlpha: 0 |
||||
generateCubemap: 0 |
||||
seamlessCubemap: 0 |
||||
textureFormat: -3 |
||||
maxTextureSize: 1024 |
||||
textureSettings: |
||||
filterMode: 0 |
||||
aniso: 1 |
||||
mipBias: -1 |
||||
wrapMode: 1 |
||||
nPOTScale: 0 |
||||
lightmap: 0 |
||||
compressionQuality: 50 |
||||
spriteMode: 1 |
||||
spriteExtrude: 1 |
||||
spriteMeshType: 1 |
||||
alignment: 0 |
||||
spritePivot: {x: .5, y: .5} |
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
||||
spritePixelsToUnits: 100 |
||||
alphaIsTransparency: 1 |
||||
textureType: 8 |
||||
buildTargetSettings: [] |
||||
spriteSheet: |
||||
sprites: [] |
||||
spritePackingTag: |
||||
userData: |
Loading…
Reference in new issue