Implementing a Quake-style Developer Console in Unity3d
Git
easy_install waitress
def test():
import os
here = os.path.dirname(__file__)
import ファイル名
ファイル名.test()
using UnityEngine;
using System.Collections;
using Behave.Runtime;
using Tree = Behave.Runtime.Tree;
public class NewBehaviourScript : MonoBehaviour, IAgent
{
Tree m_Tree;
// Use this for initialization
IEnumerator Start () {
m_Tree = BLNewBehaveLibrary0.InstantiateTree (
BLNewBehaveLibrary0.TreeType.NewCollection1_NewTree2 ,
this
);
while (Application.isPlaying && m_Tree != null)
{
Debug.Log( m_Tree.Frequency );
//~ yield return new WaitForSeconds( 1.0f / m_Tree.Frequency );
yield return new WaitForSeconds( 1.0f / 1 );
AIUpdate();
}
}
void AIUpdate ()
{
Debug.Log( "update" );
// one action been ticked.
m_Tree.Tick();
}
public BehaveResult Tick (Tree sender, bool init)
{
Debug.Log ( "got ticked" );
Debug.Log (
(BLNewBehaveLibrary0.IsAction (sender.ActiveID) ? "action" : "decorator" )
);
return BehaveResult.Success;
}
public void Reset (Tree sender)
{
}
public int SelectTopPriority (Tree sender, params int[] IDs)
{
return IDs[0];
}
public BehaveResult TickFirstAction (Tree sender)
{
Debug.Log("First!");
return BehaveResult.Success;
}
}
Shader "Library/Cull All"
{
SubShader
{
Tags {"Queue" = "Background"}
Blend SrcAlpha OneMinusSrcAlpha //ブレンド
Lighting Off
ZWrite On
ZTest Less //重要:一度描画した部分は描画しない
Pass
{
Cull Back //別にいらない
Color(0,0,0,0)
}
}
}
http://forum.unity3d.com/threads/26945-Diablo-style-health-orb