Browse Source

Added background prefab & SetActive command

master
chrisgregan 11 years ago
parent
commit
3c61965afd
  1. BIN
      Assets/Example/Scenes/Example.unity
  2. 42
      Assets/Fungus/FungusScript/Commands/SetActive.cs
  3. 8
      Assets/Fungus/FungusScript/Commands/SetActive.cs.meta
  4. BIN
      Assets/Fungus/Sprite/Prefabs/Background.prefab
  5. 4
      Assets/Fungus/Sprite/Prefabs/Background.prefab.meta
  6. 5
      Assets/Fungus/Sprite/Sprites.meta
  7. BIN
      Assets/Fungus/Sprite/Sprites/Background.png
  8. 48
      Assets/Fungus/Sprite/Sprites/Background.png.meta

BIN
Assets/Example/Scenes/Example.unity

Binary file not shown.

42
Assets/Fungus/FungusScript/Commands/SetActive.cs

@ -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);
}
}
}

8
Assets/Fungus/FungusScript/Commands/SetActive.cs.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: dbd8c931f22994b9d90e2037fffaa770
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

BIN
Assets/Fungus/Sprite/Prefabs/Background.prefab

Binary file not shown.

4
Assets/Fungus/Sprite/Prefabs/Background.prefab.meta

@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 7dd153b86fca74c329ccf129422fdbe2
NativeFormatImporter:
userData:

5
Assets/Fungus/Sprite/Sprites.meta

@ -0,0 +1,5 @@
fileFormatVersion: 2
guid: bbfa0b731252a4b70ad8eaf428d86965
folderAsset: yes
DefaultImporter:
userData:

BIN
Assets/Fungus/Sprite/Sprites/Background.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

48
Assets/Fungus/Sprite/Sprites/Background.png.meta

@ -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…
Cancel
Save