Exemplo n.º 1
0
 // Start is called before the first frame update
 private void Awake()
 {
     playerController = GameObject.Find("Player").GetComponent <PlayerController>();
     playerController.Moving(true);
     height       = GameObject.Find("Manager").GetComponent <Height>();
     waterSurface = GameObject.Find("WaterHeightController").GetComponent <WaterSurface>();
 }
Exemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     PlayerController = GameObject.Find("Player").GetComponent <PlayerController>();
     targetPosition   = gameObject.transform.position;
     step             = 0;
     waterSurface     = GameObject.Find("WaterHeightController").GetComponent <WaterSurface>();
 }
Exemplo n.º 3
0
    private GameObject[] enemys; //なんで持ってんのw

    // Start is called before the first frame update
    void Start()
    {
        rb           = GetComponent <Rigidbody>();
        waterSurface = GameObject.Find("WaterHeightController").GetComponent <WaterSurface>();
        time         = 0;
        start        = GameObject.Find("Start");
        enemys       = GameObject.FindGameObjectsWithTag("Enemy");
    }
Exemplo n.º 4
0
    private void OnEnable()
    {
        hideFlags = HideFlags.HideAndDontSave;

        if (surface == null)
        {
            surface = new WaterSurface();
        }
    }
Exemplo n.º 5
0
    void WaterSurfaceEnter(object obj)
    {
        WaterSurface surface = obj as WaterSurface;

        if (IsHit)
        {
            Explode(true);
            surface.DoSplash(gameObject, transform.position);
        }
    }
Exemplo n.º 6
0
    void WaterSurfaceEnter(object obj)
    {
        var velocity = _rb.velocity;

        if (velocity.magnitude > 1f)
        {
            WaterSurface surface = obj as WaterSurface;
            surface.DoSplash(gameObject, transform.position);
        }
    }
Exemplo n.º 7
0
    void OnEnable()
    {
        volume       = GetComponent <PostProcessVolume>();
        watersurface = FindObjectOfType <WaterSurface>();
        ppm          = FindObjectOfType <PostProcessingManager>();

        bool foundEffectSettings = volume.profile.TryGetSettings <PreDeathEffect>(out predeatheffect);

        if (!foundEffectSettings)
        {
            enabled = false;
            Debug.Log("Cant load PreDeathEffect settings");
            return;
        }
    }
Exemplo n.º 8
0
    // Start is called before the first frame update
    void Start()
    {
        gameObjectList = new List <GameObject>();
        GameObject[] gameObjects1;
        gameObjects1 = GameObject.FindGameObjectsWithTag("Move");
        waterSurface = GameObject.Find("WaterHeightController").GetComponent <WaterSurface>();
        foreach (GameObject obj in gameObjects1)
        {
            gameObjectList.Add(obj);
        }
        GameObject a;

        if (a = GameObject.FindGameObjectWithTag("Goal&Move"))
        {
            gameObjectList.Add(a);
        }
        else
        {
            gameObjectList.Add(GameObject.FindGameObjectWithTag("Goal"));
        }
    }
 // Use this for initialization
 void Start()
 {
     water  = FindObjectOfType <WaterSurface>();
     rb     = this.GetComponent <Rigidbody2D>();
     bodyrb = body.GetComponent <Rigidbody2D>();
 }
Exemplo n.º 10
0
 static void DrawGizmosSelected(WaterSurface waterSurface, GizmoType gizmoType)
 {
 }
Exemplo n.º 11
0
 // Use this for initialization
 void Start()
 {
     water = FindObjectOfType <WaterSurface>();
 }