コード例 #1
0
ファイル: Hut.cs プロジェクト: Kraiden09/Knavebard
    // Use this for initialization
    void Start()
    {
        red    = new Color(1, 0, 0, 1);
        yellow = new Color(1, 1, 0, 1);
        green  = new Color(0, 1, 0, 1);

        jam = FindObjectOfType <AudienceBehave>();

        LightHut    = GameObject.CreatePrimitive(PrimitiveType.Cylinder);
        HutZylinder = GameObject.CreatePrimitive(PrimitiveType.Cylinder);

        LightHut.name = "LightHut";
        LightHut.transform.localScale = new Vector3(1, 0.01f, 1);
        LightHut.transform.Translate(0, 0, 0);
        LightHut.GetComponent <Renderer>().material.color = new Color(1f, 1f, 0f);

        HutZylinder.name = "HutZylinder";
        HutZylinder.transform.localScale = new Vector3(0.8f, 0.15f, 0.8f);
        HutZylinder.transform.Translate(0, 0.15f, 0);
        HutZylinder.GetComponent <Renderer>().material.color = new Color(1f, 1f, 0f);

        HutZylinder.transform.parent = LightHut.transform;

        LightHut.transform.Translate(-1, 0, 4);

        LightHut.GetComponent <CapsuleCollider>().isTrigger    = true;
        HutZylinder.GetComponent <CapsuleCollider>().isTrigger = true;

        LightHut.AddComponent <HutTriggerScript>();

        //LightHut.AddComponent<CandleTrigger>();
    }
コード例 #2
0
ファイル: LightScript.cs プロジェクト: Kraiden09/Knavebard
 // Use this for initialization
 void Start()
 {
     Candle           = GetComponent <Light>();
     jam              = FindObjectOfType <AudienceBehave>();
     Candle.intensity = 0.15f;
     Candle.range     = 7;
     red              = new Color(255, 0, 0, 1);
     yellow           = new Color(255, 255, 0, 1);
     green            = new Color(0, 255, 0, 1);
     Candle.color     = yellow;
     upordown         = true;
 }
コード例 #3
0
ファイル: AudAI.cs プロジェクト: Kraiden09/Knavebard
    // Use this for initialization
    void Start()
    {
        GetComponent <BoxCollider>().size      = new Vector3(5, 4, 5);
        GetComponent <BoxCollider>().isTrigger = true;
        audienceBehave = GameObject.Find("AudienceBehave").GetComponent <AudienceBehave>();
        iam            = transform.gameObject;
        //inZone = false;

        shouts = new AudioClip[4];

        // Audio from Asset Store -> Universal Sound FX by imphenzia
        exclamation        = gameObject.AddComponent <AudioSource>();
        shouts[0]          = Resources.Load <AudioClip>("Universal Sound FX/Voices/Exclamations/EXCLAMATION_Male_B_Woh_01_mono");
        shouts[1]          = Resources.Load <AudioClip>("Universal Sound FX/Voices/Exclamations/EXCLAMATION_Male_B_Wooah_01_mono");
        shouts[2]          = Resources.Load <AudioClip>("Universal Sound FX/Voices/Exclamations/EXCLAMATION_Male_B_Yippee_01_mono");
        shouts[3]          = Resources.Load <AudioClip>("Universal Sound FX/Voices/Exclamations/EXCLAMATION_Male_B_Whoo_01_mono");
        exclamation.volume = 0.07f;
    }