コード例 #1
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.A))
        {
            // 演出開始
            StartCoroutine(viruseBaseScript.StartEvolution((int)ViruseData.EvolutionType.GOOD));
        }

        if (Input.GetKeyDown(KeyCode.Alpha1))
        {
            viruseBaseScript = baseViruse.GetComponent <ViruseBase>();

            viruseBaseScript.changeState("Damage");
        }
        if (Input.GetKeyDown(KeyCode.Alpha2))
        {
            viruseBaseScript = baseViruse.GetComponent <ViruseBase>();

            viruseBaseScript.changeState("Idol");
        }
    }
コード例 #2
0
 // Start is called before the first frame update
 void Start()
 {
     viruseBaseScript = baseViruse.GetComponent <ViruseBase>();
 }