Exemplo n.º 1
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();

        SpriteCone original = (SpriteCone)target;

        original.degrees = EditorGUILayout.FloatField("Degrees", original.degrees);
        original.radius  = EditorGUILayout.FloatField("Radius", original.radius);
        EditorGUILayout.ObjectField("Cone Object", original.cone, typeof(GameObject), true);
    }
Exemplo n.º 2
0
    private void Awake()
    {
        canShoot = true;
        aiming   = false;

        shootZone     = transform.GetChild(2).GetComponent <SpriteCone>();
        playerControl = GetComponent <PlayerControl>();
        rigidbody2D   = GetComponent <Rigidbody2D>();
        bullet        = Resources.Load("Prefabs/Bullet") as GameObject;
    }