Horje
panning script c# on phone Code Example
panning script c# on phone
#pragma strict

// The target gameObject.
var target: Transform;

// Speed in units per sec.
var speedLeft: float = -10;

private static var isPanLeft = false;


function FixedUpdate()
{
if(isPanLeft == true)
{
    // The step size is equal to speed times frame time.
    var step = speedLeft * Time.deltaTime;

    // Move model position a step closer to the target.
    transform.position = Vector3.MoveTowards(transform.position, target.position, step);
}
}

static function doPanLeft()
{
    isPanLeft = !isPanLeft;
}




Csharp

Related
c# .net core kendo dropdownlistfor enum Code Example c# .net core kendo dropdownlistfor enum Code Example
unity check if gameobject is inside collider Code Example unity check if gameobject is inside collider Code Example
struct Code Example struct Code Example
mongodb custom IIdGenerator Code Example mongodb custom IIdGenerator Code Example
C3 compare hour Code Example C3 compare hour Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
12